开发者

How to put letters into a sendmail queue using PHP

开发者 https://www.devze.com 2023-01-08 09:03 出处:网络
I want to put letters into a queue instead of sending them instantly. Also, I need to track when letters are sent. I have this basic newsletter system, so before sending a letter I need to give each l

I want to put letters into a queue instead of sending them instantly. Also, I need to track when letters are sent. I have this basic newsletter system, so before sending a letter I need to give each letter a sender ID (the newsletter user account ID) so I could track specifically what user has still letters pending to be sent. How could this be done?

Would the Sendmail queue system work if I would manually create two files (one for body and header data accordingly) in /var/spool/mqu开发者_运维技巧eue? I could name them (df|qf)_systemPrefix_clientId thus, later using PHP I could scan directory and find out what letters are still pending to be sent.


What you do is basically add '-q' parameter to mail() function.

0

精彩评论

暂无评论...
验证码 换一张
取 消