Title: Invalid MSGID
Last modified: July 13, 2021

---

# Invalid MSGID

 *  [domzy7](https://wordpress.org/support/users/domzy7/)
 * (@domzy7)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/invalid-msgid/)
 * Hello,
 * I am using POST SMTP and Sendgrid and for some reason my emails are having multiple
   msg ids included and showing as invalid msg id on mail tester
 *     ```
       Delivered-To: redacted
       Received: by 2002:a05:7108:3602:0:0:0:0 with SMTP id g2csp3115586gdd;
               Tue, 13 Jul 2021 04:04:30 -0700 (PDT)
       X-Received: by 2002:a9d:5c7:: with SMTP id 65mr3224791otd.360.1626174270290;
               Tue, 13 Jul 2021 04:04:30 -0700 (PDT)
       ARC-Seal: i=1; a=rsa-sha256; t=1626174270; cv=none;
               d=google.com; s=arc-20160816;
               b=piHwu3EBScZ3UR51r6tfbNVesJu/PGwWmemq3B4uUjoh+ekiaS0WLo94JZCBLmHadx
                KEKQBGb6uk1fIkl++2G2tD9D41AdK8euAvB7a9nEfjO+oI0BP0Oz7V9DXJWzxslwIoZO
                a0FzMjDSJ5xeg0Ex+dr9C4z07OEFxrssxQtzMVlOcyT4wIhga5zQS2bxOl4rP7pXA3tc
                Be9sFwF77DR0betGi4MnIGf0+9zD2DxfARrvD7AJCyPpEqCIxPaQ6IkwbO7eLNModtWi
                yBFA9UriyE9P4wfEd/xgtxnM4pTbvp4emybI3y9zJ3n2DABjJ5fkwqoZ/ueb+vcB9xY5
                6w5g==
       ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
               h=to:subject:message-id:date:from:mime-version:dkim-signature;
               bh=vl43TTTbxhm5vqXR/T88LoWrPXaPS5X1xoT7XaM5EXo=;
               b=rmnfuD92poYRYafPnGvB6liDzo9akIgWmh5rlRy6zqt/pLiRf2957E/pYmJFWG5+52
                CkudUVZgKTOGcbV6Qim4suNLk1+O5f7UdScbsfWTPaCJE5lO6wxpe3m21vxenNnJfAI5
                vhalNyAjon3X9dSEs5nVfpFrELLTQWpA1CXdeuxgGAITBiEXcW+wUFN/XqH4KjSQH9or
                ifEDu5rT0gApWw72dPDSP7xeyhKJFA072wloAYmh0VsgPz+qcYSJYqEecS5cnHlxlnJ9
                0xx+JL3t0U6ynteRxzHNBa2sSyEGvoxI6YiH1YqLEYL5SZ39UrnHx6MKae8Fi0mOFA0+
                pEBw==
       ARC-Authentication-Results: i=1; mx.google.com;
              dkim=pass header.i=@vikingspore.co.uk header.s=google header.b=HvupDt5j;
              spf=pass (google.com: domain of info@vikingspore.co.uk designates 209.85.220.41 as permitted sender) smtp.mailfrom=info@vikingspore.co.uk
       Return-Path: <info@vikingspore.co.uk>
       Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41])
               by mx.google.com with SMTPS id c7sor297671otf.120.2021.07.13.04.04.30
               for <dominic.eburton@gmail.com>
               (Google Transport Security);
               Tue, 13 Jul 2021 04:04:30 -0700 (PDT)
       Received-SPF: pass (google.com: domain of info@vikingspore.co.uk designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
       Authentication-Results: mx.google.com;
              dkim=pass header.i=@vikingspore.co.uk header.s=google header.b=HvupDt5j;
              spf=pass (google.com: domain of info@vikingspore.co.uk designates 209.85.220.41 as permitted sender) smtp.mailfrom=info@vikingspore.co.uk
       DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
               d=vikingspore.co.uk; s=google;
               h=mime-version:from:date:message-id:subject:to;
               bh=vl43TTTbxhm5vqXR/T88LoWrPXaPS5X1xoT7XaM5EXo=;
               b=HvupDt5jkne+EG418v10BEZa9RUNevFXdAD8YLEyq45GRm1xAcN9XlsXhjuJD8vj6U
                1f2VFd8kVOk0QqzAQNH/Z8aI1nQHiXQWYpJJudcx2Vp5wQ1IkQEaa6aA3DQEXBmUqs9b
                hjYrryytw73WNgvirNh6KaIE5POCAbshUFTxYJN2dPN5qbfHZpfhx48rjaEOTnyhchkS
                Qm+WTL5a3fa39t0DXCioT82l43DqNGf/2G9W0H/RQ8+9m5t9DHbxpajET0Xik/WNuoEA
                NbNO9S5iPTujBICRoNUIIcIqcljWqBfu5KnjgctcTlNIekSB38YLsXLkyyie7WaLJ6Ow
                kz+w==
       X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
               d=1e100.net; s=20161025;
               h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
               bh=vl43TTTbxhm5vqXR/T88LoWrPXaPS5X1xoT7XaM5EXo=;
               b=ga6gAgNAwUJafHNdoQDTtq6LQG0tBHqZ+jxVBa0qA0KCb5BWblLT2WQGJLxVqTRB+i
                efMPTc7+ZjuxHd6ibUvu2rbuRoFMJ6SYdNvhWa6GSEaGnEj2YOeBzxz0Mqr2evXFK4/K
                PmLjG3sAMdoa5epLlaineUME9NnHmRwtwDh5+FkI2q7c4ff+oGBaobZ2p6TJQOxLG+FN
                VtTvCrgwZtKnPbEugHtK2ymp1LeLUAYOYxmCVoLV5fH/OfgztHr+exGxXs4+BZ8Xqmoa
                rXRCrr4Op9fER6QezjeecB8y11YrNa8HXsRbAlvX+glytUD+E41Kgz8nVDJ4MUXRIpVO
                5IiQ==
       X-Gm-Message-State: AOAM5332isjF52Ov/k6gqQrEUfll8mnc+ivwvGnt6Hlspz1+2iEdREr/ 4ltvB/Nau4E1ukxU3zPtEwcxilRHMR+zWuz/UPb5Gd8R9vFExg==
       X-Google-Smtp-Source: ABdhPJxhjLyMuKEddMS3FpzyZX1VmoKudWoVjS7cN98T+NnhsKf64sktyayGLxmDf06Z/q6TlAPlKCXI+cCBMVcIFjw=
       X-Received: by 2002:a9d:5916:: with SMTP id t22mr3123393oth.269.1626174269942; Tue, 13 Jul 2021 04:04:29 -0700 (PDT)
       MIME-Version: 1.0
       From: Viking Spores <dominic@vikingspore.co.uk>
       Date: Tue, 13 Jul 2021 12:04:19 +0100
       Message-ID: <CAF9bqapn52-SoFaHsDKjjP=47uAL8SALRi_=EsTaQ=N73Uk5Dw@mail.gmail.com>
       ```
   
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Finvalid-msgid%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Tim](https://wordpress.org/support/users/tneville/)
 * (@tneville)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/invalid-msgid/#post-14657679)
 * Hi [@domzy7](https://wordpress.org/support/users/domzy7/),
 * Flagging to developer for comment. Unfortunately I am unable to advise when a
   reply may be possible, as the developer is very busy. Sorry!
 * Kind Regards,
    Tim
 *  [Tim](https://wordpress.org/support/users/tneville/)
 * (@tneville)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/invalid-msgid/#post-14657681)
 * [@yehudah](https://wordpress.org/support/users/yehudah/) – message ID issue
 *  Thread Starter [domzy7](https://wordpress.org/support/users/domzy7/)
 * (@domzy7)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/invalid-msgid/#post-14671322)
 * Issue fixed:
 * During a deliverable test, I noticed that I was getting the error INVALID_MSGID
   Message-Id is not valid, according to RFC 2822for emails sent using SMTP Mail
   Mailer / Email Login + SendGrid API. This was actually lowering SpamAssassin’s
   score, which led to the email being considered spam.
 * The problem seems to be that the Message-IDangle brackets are missing from the
   header around its value, eg. Message-ID: [abc@def.com](https://wordpress.org/support/topic/invalid-msgid/abc@def.com?output_format=md)
   instead of Message-ID: <abc@def.com>. Once I created the tiny array below, I 
   stopped getting the error.
 * /Postman/PostmanWpMail.php line 87:
 * – return $id . ‘@’ . str_replace(‘www.’, ”, $hostName);
    + return ‘<‘ . $id .‘
   @’ . str_replace(‘www.’, ”, $hostName) . ‘>’;`
    -  This reply was modified 4 years, 10 months ago by [domzy7](https://wordpress.org/support/users/domzy7/).
 *  [mpskovvang](https://wordpress.org/support/users/mpskovvang/)
 * (@mpskovvang)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/invalid-msgid/#post-14731830)
 * Hello
 * Our SpamAssassin score is also negatively affected by the Message-ID header not
   following the RFC 2822.
 * I’ll donate a $50 bounty if this issue can be resolved within the next week.
 * Thanks, Martin.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Invalid MSGID’ is closed to new replies.

 * ![](https://ps.w.org/post-smtp/assets/icon-128x128.gif?rev=3209655)
 * [Post SMTP – Complete Email Deliverability and SMTP Solution with Email Logs, Alerts, Backup SMTP & Mobile App](https://wordpress.org/plugins/post-smtp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-smtp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-smtp/)
 * [Active Topics](https://wordpress.org/support/plugin/post-smtp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-smtp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-smtp/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [mpskovvang](https://wordpress.org/support/users/mpskovvang/)
 * Last activity: [4 years, 10 months ago](https://wordpress.org/support/topic/invalid-msgid/#post-14731830)
 * Status: not resolved