.NET, to SendGrid, to Gmail getting From Header missing

emailemail-servergmailsendgridsmtp

I received this message below within SendGrid that was being sent to Gmail. However this has always worked, and of course I am have a FROM email address included. Is this something else or a bug?

550 5.7.1 [208.117.55.132 11] Our system has detected that this message is not RFC 5322 compliant: 'From' header is missing. To reduce the amount of spam sent to Gmail, this message has been blocked. Please visit https://support.google.com/mail/?p=RfcMessageNonCompliant and review RFC 5322 specifications for more information. k7si5926825iok.8 - gsmtp

Best Answer

I had this issue with PHP sending via SendGrid to Gmail. It seems to be solved by changing the From header to have the email address in between < and >.

Old:

From: someone@example.com

New:

From: <someone@example.com>
Related Topic