0

I am new to php.I am in need of a script where the reminder must be sent to the client and also to me about the expiry of the website.

The mail should be sent first 60 days before the expiration date. later on 30 days,15 days,7 days and their after continuously till it has been renewed. Also the client name,email id must only be sent to me through email.

I am in need please help me.

Thanks in advance.

vkm
  • 11
  • 1
  • What OS ? Linux ? Windows ? If Linux, use CRON to check everyday if there is an email that match your criteria. I mean : CRON will execute php -c yourphpscript.php , your script will check if there is any email to send, and send it if necessary. – Cedric Jul 07 '11 at 11:46
  • http://stackoverflow.com/questions/132971/what-is-the-windows-version-of-cron will probably help you. So every day, run your php script with the method indicated in that topic (see link), and in your script, do something like what Bojan K has suggested. I guess that'll solve your problem :) – Cedric Jul 07 '11 at 11:58

1 Answers1

0

Well, you will need to store if you already sent an email that day, but other then that

SELECT DATEDIFF( CURDATE( ) , expire ) AS daysleft, id, user, email
FROM something WHERE 
daysleft='30' 
OR daysleft='60' 
OR daysleft='15'
OR daysleft='7'

something along this line could work, then you say like You have $data->$daysleft left.

Bojan Kogoj
  • 4,521
  • 1
  • 30
  • 52