Comments (2)
Hi @shotap --
From what you pasted, it looks to me like possibly an invalid email. It looks like the headers are something like this:
blah: blah
Content-Type: text/html; charset=UTF-8
<!DOCTYPE HTML>
The presence of one new-line followed by a space means the <!DOCTYPE line is part of the previous header line if I'm reading that correctly:
https://tools.ietf.org/html/rfc822#section-3.1.1
In which case a large part of the body may be part of the headers as well, and the character encoding isn't the only problem you'd encounter with that email unfortunately.
Could you tell me if the email opens up correctly in a mail client? The best way I've found to test that is using the ImportExportTool on Thunderbird because you can use it to open a raw message stored locally.
Could you also paste the entire email on pastebin (removing private data of course), or maybe just the headers and the first few lines of the message here? Perhaps the parser is missing something.
from mail-mime-parser.
Charset handling has evolved and been moved to zbateson/mb-wrapper. Not sure if this is an issue in the latest version, feel free to reopen if this needs to be looked at more.
from mail-mime-parser.
Related Issues (20)
- Mail ->getTextContent() ends with TypeError fwrite() HOT 4
- Fatal error Message::parse() method doesn't exist.
- Changed return type in php 8.2 HOT 9
- How to get all TO email addresses HOT 1
- Issue saving attachments after upgrading to 2.0 HOT 1
- Get Email & getAdresses not found
- Can not get header info
- docs wrong way of getting sender name? HOT 1
- phpstan complains about method getAddresses HOT 2
- feature request HOT 9
- Ending boundry "--<UUID>--" is being pulled out while parsing HOT 2
- cid mismatch - attachement HOT 1
- Missing function markAsChanged HOT 1
- High CPU with email with specific encoding HOT 3
- Possible memory leak when parsing mails in a loop HOT 1
- Parsing email attachment on error encoding HOT 1
- "Header\IHeader" does not contain "getEmail()" HOT 2
- Support for newer versions of mb-wrapper and stream-decorators HOT 6
- Update type hint
- HELP: Getting the email from the forwarded email 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 mail-mime-parser.