Forum Moderators: coopster
The storying behind why multiple emails are being sent. Simple web form processed by php sending the contents via email and also creates a record in a database on a different server.
The second email is sent when an error occurs when interacting with the database. The email is sent to notify the appropriate personnel that the database is down or unable to be reached and the record must be manually added.
While troubleshooting I found some details in the php website user feedback section that modifying the header Message-ID to ensure uniqueness may resolve the problem as some mail servers consolidate messages with the same Message-ID.
Anyone know of a best practice to ensuring multiple mail() calls are always received when sent.
Thank you for your response in advanced.
Kevin
The emails are being sent from one web host to another web host where the emails are received. I suspect the emails have the same message id's (not sure why) and the mail server just accepts one of them. Which ever arrives first maybe, I'm guessing its a matter of milliseconds.
I did modify the header on the second email to force a unique Message ID and it resolved the problem, but I believe there has to be a better way to ensure robustness.
Thank you for your feedback and wisdom in advance