Invalid Message ID
-
I’m using version 2.0.23 with SendGrid. I noticed an issue where Google appeared to be flagging the Message ID as invalid and replacing the Message ID generated in Post SMTP with it’s own Message ID and storing the original Message ID in x-google-original-message-id. This was causing problems with our inbox software (Front) where duplicate messages were showing up for emails sent to multiple recipients because each message to each recipient was being assigned a different message ID by Google.
Here is a portion of the source from one of the messages I had an issue with:
Message-ID: <[email protected]>
X-Google-Original-Message-ID: 13c97910af5ddb228441e952828ddfc7@courses.myconsultanttraining.comI found somewhere per RFC 5322 the message ID is supposed to be encapsulated in “<” and “>”, but the message ID generated by Post SMTP is not.
I changed the file /post-smtp/Postman/PostmanWpMail.php line 87 from
return $id . '@' . str_replace('www.', '', $hostName);TO
return '<' . $id . '@' . str_replace('www.', '', $hostName) . '>';And it has resolved the issue I was having with the duplicate messages in Front. I also saw that messages are now coming through without X-Google-Original-Message-ID and Message-ID looks like this:
Message-ID: <91f04df1d84a5219d2e18dc9d0401c03@courses.myconsultanttraining.com>
This is not my area of expertise. Can you verify this is a legit issue and if so would it be possible to fix this in an upcoming release?
Thanks!
Jeremy
The topic ‘Invalid Message ID’ is closed to new replies.