dsfe167834 2011-12-12 09:52
浏览 18

Phpmailer延迟交付

Is it possible to somehow delay the messages sent with phpmailer?

What i want to do is send an e-mail when a user performs a given action (e.g. an order) but don't deliver it yet because this might get the users attention and stop him from ordering.

I know i could queue the e-mail in a database and then send it with a cronjob. But i don't want this because i don't think this is the best solution. In my opinion the best solution would be to send the e-mail to the smtp server (or local mailhandler) and let them handle the delay.

  • 写回答

1条回答 默认 最新

  • dqwh0108 2011-12-12 10:49
    关注

    You've flagged this as php and phpmailer - but your question is specifically about the MTA.

    It's quite possible to write a record instead of sending an email, then schedulnig a job to run later and turn the record into an email - you just need to write some code to implement this. There are many ways this could be implemented (sorry, but I really don't like DaveRandom's solution).

    Most MTAs can be set to batch and selectively send emails, also apply throttling limits, although I'm not aware of one which applies an explicit delay - but it would be possible to implement this e.g. using milters. However you've provided no details of what the MTA is.

    评论

报告相同问题?

悬赏问题

  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程
  • ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
  • ¥15 关于smbclient 库的使用