email-parse | email address parser for php that is reasonably RFC822 | Parser library
kandi X-RAY | email-parse Summary
kandi X-RAY | email-parse Summary
Email\Parse is a multiple (and single) email address parser for php that is reasonably RFC822 / RFC2822 compliant.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Parse email addresses
- Adds an address to the addresses array
- Validate domain name
- Builds the email address array .
- Handle quotes from email address
- Sets the banned characters .
- Returns the banned characters .
email-parse Key Features
email-parse Examples and Code Snippets
Community Discussions
Trending Discussions on email-parse
QUESTION
I've set up SES to receive emails on my domain and then store the emails to S3. I trigger an SNS notification when a new email has arrived which triggers a lambda to do processing with the contents inside the email. Everything works as expected however, I'm not able to get any sensible data out of the emails I fetch from S3. For instance, getting an object from S3 of the email gives me this data :
...ANSWER
Answered 2019-Nov-06 at 18:00Yes, you need a parser.
Amazon SES will store incoming emails in S3 in RFC822 format, meaning exactly as they are received from the wire. This is by definition plain text, no matter how complex the email, even if it has attachments. Somewhere inside that RFC822 text piece there may or may not be some HTML in the body. An email's body can be plain text only, it can be HTML (most common) or it can be both.
You'll need to use a library which can parse RFC822. There are quite many of those. Which one to use will depend on your language choice. You'll also need to familiarize yourself with the anatomy of an Internet email message, i.e. RFC822. You'll find a wealth of information on that with a bit of googling. Suggestion: Your own email client can most likely save an email in RFC822 format and then you can use that as an example of what an email truly looks like in its 'native' format. Just have a look at it in your favorite text viewer.
Your question can be rephrased into an RFC822 parsing question. Some people refer to such files as .eml
files. Same thing.
Happy hunting.
QUESTION
ANSWER
Answered 2017-Nov-15 at 21:24The body of the message is MIME-encoded - that's why it contains the text in both plaintext and HTML formats. In order to get just the plaintext of the body, you first need to MIME-decode the message. You can use python's email package to do the MIME-decoding. Also, see this question for more information.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install email-parse
PHP requires the Visual C runtime (CRT). The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable for all these PHP versions, see visualstudio.microsoft.com. You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds. The CRT installer supports the /quiet and /norestart command-line switches, so you can also script it.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page