Page 1 of 1

Sending mails to Gmail needs Message-ID

Posted: Thu Aug 04, 2022 1:23 pm
by hoerbie
Hi,

sending mails with PB always needs a bit of luck, but actually I could no longer send mails from my mailserver to Gmail, all mails were bounced by Gmail due to a missing "Message-ID", that PB not automatically generates and my mailserver doesn't insert. In RFC this is not totally mandatory, but it looks like Gmail wants it now since this July.

After looking in the headers of other mails, solution for me was:

Code: Select all

SetMailAttribute(#yourmailid, #PB_Mail_Custom, "Message-ID: <"+FormatDate("%yyyy%mm%dd%hh%ii%ss", Date())+"."+RSet(Str(Random(999999,0)), 6, "0")+"@"+yourmailservershostname$+">")
Greets, hoerbie

Re: Sending mails to Gmail needs Message-ID

Posted: Thu Aug 04, 2022 10:01 pm
by BarryG
Weird. I don't need to set a Message ID to send emails both to or from Gmail. I just tried again to check, and nope, not needed here.

Are you using an app password like I said here? -> https://www.purebasic.fr/english/viewto ... 27#p586827

Re: Sending mails to Gmail needs Message-ID

Posted: Thu Aug 04, 2022 10:12 pm
by NicTheQuick
I guess it depends on from which server you actually send the mail. If it was gmail itself it works and if it was an other mail server then it does not work?

Re: Sending mails to Gmail needs Message-ID

Posted: Fri Aug 05, 2022 8:08 am
by hoerbie
Hi,

I don't use Gmail as sender, so there are no problems with their app passwords. My tip is for Gmail as ending receiver of a sent mail.

I'm using smtp from PB to my own linux server with s/qmail mail server software hosted in a german data center. This server has a standard configuration like a lot other servers, and it delivers the mails then to Gmail and others.
Maybe other mail server software automatically insert a Message-ID when it is missing, and then there is no problem?

Greets, hoerbie