How to build an email queue with PHPmailer?
问题 I have built an emailing script with PHPmailer after inserting into a table, however, I'm getting a bad gateway 502 coz the script times out. and sending 300+ emails in response to a web request doesn't sound like a good idea to me. So my question is how can I build a queue that will send the emails in the background? as far as I understand I will need new table lets say email_queue_table insert the email addresses, content and then have a field called status sent or queued create a while