Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Gmail Rejected For Invalid Message ID When Sending From SMTP

Status
Not open for further replies.

Auguy

Programmer
May 1, 2004
1,206
US
Here is the rejection I'm getting.

Failed Recipient: Somebody@gmail.com
Reason: Remote host said: 550 5.7.1 [68.70.182.60] Messages missing a valid messageId header are not
5.7.1 accepted. m24-20020aed27d8000000b0031ed8c203f3si7715036qtg.266 - gsmtp

-- The header and top 20 lines of the message follows --

Received: from DESKTOP-EHED324 (UnknownHost [12.200.88.186]) by sm1.Company1.net with SMTP
(version=TLS\Tls
cipher=Aes256 bits=256);
Wed, 20 Jul 2022 14:34:49 -0400
Message-ID: <5c671334-91a1-4896-951d-52bd6ca50653>
MIME-Version: 1.0
From: "Company2" <sales@CompanyName.com>
To: Somebody@gmail.com
Date: 20 Jul 2022 14:33:32 -0400
Subject: Contract
Content-Type: multipart/mixed; boundary=--boundary_1_39386abc-11ab-448f-b2fc-f0ffd50e5e77

I have tried
Code:
      Dim objGuid As Guid = New Guid()
      objGuid = Guid.NewGuid()
      Dim MessageID As String = "<" & objGuid.ToString() & "@CompanyName.com" & ">"
      message.Headers.Add("Message-ID", MessageID)
But it still gets rejected by g mail recipients, others are OK.
Do I need something else in the Header for g mail?
I've looked for how to generate a valid message ID for g mail, but haven't found anything that describes exactly how to create a valid one.



Auguy
Sylvania/Toledo Ohio
 
Hello

I've the same problem, did you find a solution ?

I've also found nothing on how to create a valid message id....

thanks

best regards
 
Ericep,
The code I posted may be working.
Still testing.
One email I sent went thru to the g mail account, but they got a warning about coming from a third party (or something like that).
I can live with that, but the client may not be happy.

Stromngm,
Their internet and email provider is using Smartmail.
Supposedly they have DKIM configured correctly.
I will pass the links on to them.
They also told me the issue is that Smartmail does not automatically add a header for mail sent thru SMTP.
They also said that Smartmail was looking into making a change about this.

Thanks to both of you.

Auguy
Sylvania/Toledo Ohio
 
>Supposedly they have DKIM configured correctly.

Fair enough - although I'd have then expected to see a [tt]DKIM-Signature[/tt] header in the bounced message.
 
This code seems to work, but some of the recipients get a warning about third party emails or something like that. But a least they are going thru.
Code:
Dim objGuid As Guid = New Guid()
      objGuid = Guid.NewGuid()
      Dim MessageID As String = "<" & objGuid.ToString() & "@CompanyName.com" & ">"
      message.Headers.Add("Message-ID", MessageID)

Auguy
Sylvania/Toledo Ohio
 
Odd - that's the exact same code you reported did NOT work in your original post
 
I think that was operator error on my client's end.
Working with a "NON computer literate user and I think they clicked on their live program and not the test one I sent them.


Auguy
Sylvania/Toledo Ohio
 
The problem may be related to the "@CompanyName.com" part of your code as the initial example is missing an @<something>, which required for a valid message-ID.
This may not be the reason Gmail rejected the message -there seems to be a general problem in this area since early August- , but it may be related.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top