How to put letters into a sendmail queue using PHP
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.
精彩评论