-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GMail Plain Text Wrapping #12
Comments
Hey there! I noticed a line break between line 6 and 7, which is not supposed to happen. How was the email originally parsed? Via I removed the line break:
And the result is now ok: {
"forwarded": true,
"message": null,
"email": {
"body": "Email Start Here...",
"from": {
"address": "sender@email.com",
"name": "Sender"
},
"to": [
{
"address": "recipient@email.com",
"name": "Recipient"
}
],
"cc": [
{
"address": "recipient1@email.com",
"name": "Recipient 1"
},
{
"address": "receipient2@email.com",
"name": "Recipient 2"
},
{
"address": "recipient3@email.com",
"name": "Recipient 3"
}
],
"subject": "Test Email",
"date": "Fri, 25 Feb 2022 at 18:08"
}
} |
Thanks for the super-quick reply. We're receiving the messages via SendGrid's Inbound Parse webhook (https://docs.sendgrid.com/for-developers/parsing-email/setting-up-the-inbound-parse-webhook#example-default-payload) and using the plain-text version of the email. It does seem to be a known issue that GMail will wrap plain-text to 78 characters (https://fix.lazyjeff.com/2013/02/why-does-gmail-wrap-text-in-my-emails.html). Are you guys using the html version of the email or plain text? |
Ok, in that case my advise would be to use a dedicated parser like mailparser and give it the raw email. As a result you will get a clean, un-wrapped text representing the email. |
Thanks for providing this library, it's excellent.
I wonder if you've ever seen an issue we're seeing where when we pass the plain-text email text to the library which has come from gmail, the lines are wrapped at 78 characters. This means that the cc list doesn't get parsed correctly and we end up with incomplete recipient lists. An example of how those emails look is shown below.
The text was updated successfully, but these errors were encountered: