Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I need to implement a simple mail queue in PHP, with task priority and scheduled send time for mail items, inside a WordPress plugin. I have looked at some existing queue packages, as well the queuing function of my mail package, Swift, but given the simplicity of my requirements, and the inadequacies in existing mail queues, I have decided to implement my own, using a base queue manager, i.e. a queue not dedicated to mail.

Are there any decent, fairly well documented, PHP queue managers that I can look at here? I am busy Googling, but Google doesn't have the advantage of developer experience and commentary.
Posted

1 solution

I can't recommend one personally, but if your needs are simple, roll your own.

1. Have your web page write the e-mail to a file on the filesystem, like in /var/youapp/mail, or to a table in a database.
2. Set a cron job to run a php script every x minutes. The script checks for new entries, tries to send them, and deletes them if successful.

I've used this method very successfully in the past.

_________________________________
Yvan Rodrigues
Red Cell Innovation Inc.
L'innovation de Globules Rouges Inc.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900