Comments (3)
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 mailparser
?
I removed the line break:
---------- Forwarded message ---------
From: Sender <[email protected]>
Date: Fri, 25 Feb 2022 at 18:08
Subject: Test Email
To: Recipient <[email protected]>
Cc: Recipient 1 <[email protected]>, Recipient 2 <[email protected]>, Recipient 3 <[email protected]>
Email Start Here...
And the result is now ok:
{
"forwarded": true,
"message": null,
"email": {
"body": "Email Start Here...",
"from": {
"address": "[email protected]",
"name": "Sender"
},
"to": [
{
"address": "[email protected]",
"name": "Recipient"
}
],
"cc": [
{
"address": "[email protected]",
"name": "Recipient 1"
},
{
"address": "[email protected]",
"name": "Recipient 2"
},
{
"address": "[email protected]",
"name": "Recipient 3"
}
],
"subject": "Test Email",
"date": "Fri, 25 Feb 2022 at 18:08"
}
}
from email-forward-parser.
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?
from email-forward-parser.
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.
Then you can pass that text to email-forward-parser
.
from email-forward-parser.
Related Issues (15)
- Python version? HOT 1
- Outsource regexes? HOT 2
- Mails with blocks added after underscore are not correctly managed HOT 10
- base64 encoded emails HOT 2
- Go port HOT 2
- Cannot find module './build/Release/re2.node' HOT 6
- Failed to parse non-indented forwarded emails HOT 1
- Multiple re2 installations, should be a peer dependency HOT 4
- Outlook Desktop does not parse the forwarded email HOT 11
- Would it be possible to get the layered forwarded emails? HOT 3
- Add types for the library HOT 1
- error while importing package HOT 5
- Running this package with node18 in aws lambda results in GCLIB errors HOT 2
- Improve coverage of IONOS by 1 & 1 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from email-forward-parser.