Here's how it will work:
I have a website. Currently, a person signs up for an account. Their email and date/time of signup is recorded to a MySQL user database. (This already happens and is not part of the project.)
1. They receive an immediate email welcoming them. (This already happens and is not part of the project.)
2. In 14 days from their date of signup (for example), they receive another email
3. In 30 days from their date of signup, they receive another email
4. In 90 days from their date of signup, they receive another email
The script needs to automatically run once per day. It checks the user database to see how much time has elapsed from each date of signup. IF either 14, 30 or 90 days have elapsed, the script will activate a another, corresponding script (one for each time interval – three in all) which sends an email to that user. There will be a different but similar script for each time interval that will send a different email.
What I need from you:
- The PHP script that scans the MySQL database to check for time elapsed from date of signup AND make sure that person is accepting emails.
- The PHP script that sends an email to that person - there will be three of these, one for 14 days, 30 days and 90 days. You only need to create a generic email that says “Hello (UserName)” or something -- I'll do the rest, including an "unsubscribe" to allow the person to remove themselves from the mailings. Obviously, this script will pull the user's email and name (at least) from the MySQL db.
I know this will involve cron, so I'll need details on setting that up properly. This is a GoDaddy linux host.
Email me if you have more questions.