简体   繁体   中英

How to automatically generate email script to send mail to the client before the expiry date in php?

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.

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM