简体   繁体   中英

Invalid SMTPAPI Header - SendGrid

I am using SendGrid for an automated mailing system that I am developing.

Unfortunately I am getting this error out of nowhere, on random occasions, from time to time.

First I thought that I am exceeding the allowed 1000 chars line length, that was probably true, since after I've added "\\r\\n" in various HTML parts of the email, the error started occurring more rarely.

The SendGrid "Support Engineers" are completely impotent when it comes to solving this isse.

And still, this situation is very problematic for me, since it's one of the most crucial core feature of my system, and it must be solid and reliable.

Thanks in advance for any assistance.

Sorry to hear you've been running into trouble with the SMTPAPI and that support wasn't able to assist you. You're probably right about hitting the 1000 character limit. Depending what you're sending the email with, you might be able to add in some indenting space to solve the problem:

var SMTPAPIHeader = JSON.stringify(yourJSONobject, null, " ");

See this question for more details on that:

Newlines resolved as =0A in Sendgrid X-SMTPAPI header

Also, feel free to email community@sendgrid.com if you'd like some more help from our developer relations team.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM