尝试通过一种机制来传递电子邮件,该机制可检查客户是否在过去 x 次内收到过电子邮件。 如果是,请不要再给他发电子邮件并存储日志供您稍后检查。
Try passing your emails through a mechanism that checks whether a customer has been emailed in the last x time. If yes, then don't email him again and store a log for you to check later.
Filter the input emails to be certain that they are only a single email when put in to the header. This is a big issue with the mail function https://www.php.net/manual/en/function.mail.php since it allows a spammer to put in multiple extra emails in a email form and submit a message and have your server send out their spam email.
发布评论
评论(3)
尝试通过一种机制来传递电子邮件,该机制可检查客户是否在过去 x 次内收到过电子邮件。 如果是,请不要再给他发电子邮件并存储日志供您稍后检查。
Try passing your emails through a mechanism that checks whether a customer has been emailed in the last x time. If yes, then don't email him again and store a log for you to check later.
您可以保留每个用户/电子邮件的“最后发送的邮件”(带有时间戳)列表,如果最后的邮件仅在(天/小时)前发送,则拒绝发送邮件。
您应该将其嵌入到您的“sendmail”功能中。
You can keep a list of "last mail send" (with timestamp) per user/email and refuse to send the mail if the last mail was send only a (day/hour) ago.
You should embed this in your "sendmail" function.
过滤输入电子邮件,以确保它们在放入标题时只是一封电子邮件。 这是邮件功能的一个大问题 https://www.php.net /manual/en/function.mail.php 因为它允许垃圾邮件发送者在电子邮件表单中放入多封额外的电子邮件并提交消息,然后让您的服务器发送垃圾邮件。
Filter the input emails to be certain that they are only a single email when put in to the header. This is a big issue with the mail function https://www.php.net/manual/en/function.mail.php since it allows a spammer to put in multiple extra emails in a email form and submit a message and have your server send out their spam email.