Emails being sent to customers who are in the mysql?

How do you do it, so that emails get auto sent to customers at certain intervals (GDPR allowing)?

Their names and addresses would have been entered into the sql when they signed up as a customer.

Also, how do I add names and addresses manually to that sql db as well please?

You will need to create a PHP script and setup a cron job to send the emails.

However, you will require an SMTP server, a domain name and an SMTP username.

Basically, your script will retrieve email addresses from the databases and pass them to the PHP sending script at the set interval to send the emails.

An SQL would like something like this:

select email_addresses from customers

Then, once you get the list, iterate through the array and send the emails.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.