简体   繁体   English

如何自动生成 email 脚本在 php 中的到期日期之前向客户端发送邮件?

[英]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.我是 php 的新手。我需要一个脚本,必须将提醒发送给客户以及关于网站到期的通知。

The mail should be sent first 60 days before the expiration date.邮件应在到期日前 60 天发送。 later on 30 days,15 days,7 days and their after continuously till it has been renewed.之后 30 天、15 天、7 天和他们之后的连续直到它被更新。 Also the client name,email id must only be sent to me through email.此外,客户名称、email id 只能通过 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好吧,如果您当天已经发送了 email,则需要存储,但除此之外

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 .沿着这条线的东西可以工作,然后你说You have $data->$daysleft left

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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