Where is the mail queue for PhpMailer? Sent 1400 emails and it seems only about 80 go out every six hours

2013-11-14
2013-11-14
  • serendipitous
    serendipitous
    2013-11-14

    First, let me apologize for any dumb questions -- our main developer is out of the country and deployed prior to leaving ... and I am doing the best I can being new to php. I did search the forums and wasn't able to find any topics, so here it goes.

    We sent out about 1400 emails using PHPMailer. The code iterated through individual emails and sent them out. It looks like the developer did not have the SMTPKeepAlive setting to true in the code, however.

    What we are seeing is that about 80 emails come through to our Exchange server at a time, then nothing for about six hours. We haven't seen any emails in more than six hours at this point, and we know that only about 200 have gone out.

    Is there a queue I can examine or any settings I can modify to help speed the process up? Or, is there a way to kill the queue then resend the emails, this time setting the SMTPKeepAlive to true?

    Any help is very much appreciated!

    Jennifer

     
  • Marcus Bointon
    Marcus Bointon
    2013-11-14

    Firstly, PHPMailer is no longer supported here, go to GitHub: https://github.com/PHPMailer/PHPMailer

    PHPmailer is just a mail client, not a mail transfer agent (MTA), and as such does no queueing. It can work with queueing systems - for example you could use beanstalkd from within PHP - but usually it relies on running a capable local mail server that handles queuing, since mail queuing is a complex problem that's much better solved by MTAs.

    Using keepalive is definitely a good idea and that's simple to turn on. It sounds like your exchange server is the root of these problems; if you enable SMTP debug output, you should get more of a handle on what's going on.

    While it's possible to do MX lookups etc and send directly from PHPMailer, it's much faster and more reliable to hand off that job to a local mail server.

     
  • serendipitous
    serendipitous
    2013-11-14

    Thanks!!!!