Duplicate Message-ID problem
A customer of mine has been unable to receive email messages sent via a particular form created using UE. It was puzzling that the message was received without problems using a second email address (on a different server). I finally discovered the answer today. UE sends duplicate Message-IDs in the email header. Someone running the relevant server informed me:
>Badly configured mailservers will not even notice that all messages have the same id.
Server in X's office is capable of verifying if messages have been received already in order to avoid duplications and more importantly e-mail scattering or floods.
All messages originating from the website have the same ID:
I've replaced the following lines in mail_PHP.php (starting at line 185):
/* $theMSGID = $retArray;
$theMSGID = explode("@", $theMSGID);
$theMSGID = "<".md5($theMSGID)."@".$theMSGID.">";*/
$len = 20;
$chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
for($i=0; $i<$len; $i++) $rand_string .= substr($chars,rand(0,strlen($chars)),1);
$theMSGID = "<".$rand_string."@xxx.com>";
There may well be a better way to do this. Perhaps numbers would be sufficient. The original method seems complicated and not effective. As far as I know this hasn't caused problems generally but obvious could. On the other hand my customers do occasionally contact me saying the odd message can't be delivered; of course there can be many reasons - perhaps this is one of them.
Unless there are other issues I'm not aware of, could this be addressed in an update?