简体   繁体   中英

Mailjet/Sendgrid: Sending an email with a colon in the body shows "No content'

For the past couple days, I've been trying to send a fairly simple plain text e-mail using both Mailjet and Sendgrid. There's no error when I send it, but the recipient can't open the message, which shows a "No content" error on most mail clients.

Here's the body of the email:

Date: 2021-02-05
From: +1-202-555-0137
Content: Lorem ipsum dolor sit amet, consectetur adipiscing elit.

I've come to the conclusion that the problem is the colons present in the mail. When removed, the recipient can open the message with the full content. From my understanding, this is because colons are used to separate between header key and values.

To fix the problem, just insert a blank line ( \n ) at the beginning of the body, such that the headers and body will be properly separated.

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