I was wondering how I can send reminder to my users (via email) two months, a month and one week before their account expiration date (eg. $accountExp which is a unix timestamp)?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
set up a cron job to run a php script that will fetch entries in this way e.g.
/* send those 2 months before exp date*/
$sql=’select * FROM users WHERE exp_date_unix>=’.(time()+86400*60);
or if you use the datetime/timestamp field
the condition would be smth like
DATE_DIFF(exp_date_unix, CURRENT_TIMESTAMP) >=60;