• 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.com

    I 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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Tim

    (@tneville)

    Hi @jlaunder,

    Escalating this to the developer for comment. 🙂
    @yehudah

    Kind Regards,
    Tim

    Good morning,

    Firstly, thank you for producing such a remarkable tool.I wanted to give this thread a bump to also say I’ve experienced the same issue while using the SendGrid API & Post SMTP. Mail-Tester has reported along the same lines of

    Message-Id is not valid, according to RFC 2822

    And gmail reported the same

    Message-ID: <[email protected]>
    X-Google-Original-Message-ID: [email protected]

    I can confirm that this is still an issue with a new deployment as of today using Sendgrid API.

    Maybe @tneville or @yehuda have some input.

    • This reply was modified 4 years, 10 months ago by thankyou2021.
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Invalid Message ID’ is closed to new replies.