title: PHPMailer : replace the default messageID
body: <p>I send emails using PHPMailer, evthg works well but I would to set a uniq MessageID for each email.</p>
  
  <p>PHPMailer version : "v5.2.16"</p>
  
  <p>(loaded with Composer from <a href="https://github.com/PHPMailer/PHPMailer.git" rel="nofollow noreferrer">https://github.com/PHPMailer/PHPMailer.git</a>)</p>
  
  <p>I found the documentation here :
  <a href="http://phpmailer.github.io/PHPMailer/classes/PHPMailer.html#property_MessageID" rel="nofollow noreferrer">http://phpmailer.github.io/PHPMailer/classes/PHPMailer.html#property_MessageID</a></p>
  
  <p>so here is what I tried :</p>
  
  <pre><code> $mail = new PHPMailer;
   ...
   $mail-&gt;MessageID = md5('HELLO'.(idate("U")-1000000000).uniqid()).'-'.$type.'-'.$id.'@domain.com';
  </code></pre>
  
  <p><strong>Result :</strong> This is always the default MessageID generated by PHPMailer :</p>
  
  <p><a href="https://i.stack.imgur.com/SYJ47.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SYJ47.jpg" alt="enter image description here"></a></p>
  
  <p>and not mine... :(</p>
  
  <p>Then I tried sthg more simple :</p>
  
  <pre><code> $mail-&gt;MessageID = "blablag@domain.com";
  </code></pre>
  
  <p><strong>Result</strong> : KO (the same)</p>
  
  <p>The documentation indicates that we can set a MessageID, and it should be a string, I don't understand at all why it doesn't work... </p>
  
  <p>Any idea ?</p>