PHP & MySQL application using Mail() function sends some emails fine, then starts sending blank emails
Posted on 2011-09-23
I am using an application written by someone else using PHP and MySQL. Part of the application sends out emails (in large quantities) to a list of email addresses that you populate in the software. It sends them using the PHP Mail() function. What is happening, is that sometimes the emails hang upon sending. Many will send, but then the application appears to hang. It's unclear if the issue is with the application itself, or the server(s) I have it running on. My first thought was that the emails were being blocked by the smtp server (and institutional server) that they were being sent through -- possibly being mis-identified as spam. I contacted the smtp server folks, they pulled the logs, and could identify that many successful emails went through, then a series of empty emails were attempting to be sent. These are completely empty -- the from, the to, the body, etc... all empty, so they never get sent, of course (and never received). Since many, many places use this software successfully, it's unlike something is wrong in the code (though always possible). I think something is wrong on my servers -- either with PHP, MySQL, or with memory & cpu resources, etc. I'm at a loss as to how to troubleshoot the issue. Does anyone have any thoughts on what might cause this behavior? How can I narrow down the cause? Both servers are running Windows 2003 server (IIS & PHP on one, MySQL on the other). Any help would be greatly appreciated.