• While doing deliverability testing, I noticed that I was receiving the error INVALID_MSGID Message-Id is not valid, according to RFC 2822 for mail sent using Post SMTP Mailer/Email Log + SendGrid API. This was really reducing the SpamAssassin score, causing email to be treated as spam.

    The problem seems to be that the Message-ID header is missing angle brackets around its value, e.g. Message-ID: [email protected] instead of Message-ID: <[email protected]>. When I made the tiny edit below, I stopped receiving the error.

    /Postman/PostmanWpMail.php line 87:

    - return $id . '@' . str_replace('www.', '', $hostName);
    + return '<' . $id . '@' . str_replace('www.', '', $hostName) . '>';
    • This topic was modified 5 years, 8 months ago by Mike.

The topic ‘SpamAssassin INVALID_MSGID caused by missing angle brackets’ is closed to new replies.