Message-ID header incorrectly formatted
-
Hello,
It seems that the value of the Message-ID header is not formatted as per https://www.rfc-editor.org/rfc/rfc2822. It should be enclosed in angled brackets.
We ran into an issue where Mandrill would flag our emails as spammy, because of that. Applying the following change fixed the problem:
/** * Creates the Message-ID * * @return string */ public function createMessageId() { $id = md5(uniqid(time())); if (isset($_SERVER["SERVER_NAME"])) { $hostName = sanitize_text_field($_SERVER["SERVER_NAME"]); } else { $hostName = php_uname('n'); } //return $id . '@' . str_replace('www.', '', $hostName); -- CHANGED BY US return '<' . $id . '@' . str_replace('www.', '', $hostName) . '>'; // ++ CHANGED BY US }
Could you please include it in future releases, if it makes sense?
Thanks!
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Message-ID header incorrectly formatted’ is closed to new replies.