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:
854a7c3efa9a932c16c1ac62a2167d83<
I've replaced the following lines in mail_PHP.php (starting at line 185):
/* $theMSGID = $retArray[0][1];
$theMSGID = explode("@", $theMSGID);
$theMSGID = "<".md5($theMSGID[0])."@".$theMSGID[1].">";*/
with:
$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?
Thanks,
Tom