Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/madmax3365/email-body-cleaner
Get clean ( latest ) message from email body tree
https://github.com/madmax3365/email-body-cleaner
email-body-parsing typescript
Last synced: about 7 hours ago
JSON representation
Get clean ( latest ) message from email body tree
- Host: GitHub
- URL: https://github.com/madmax3365/email-body-cleaner
- Owner: madmax3365
- Created: 2019-11-13T07:13:32.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-08-11T16:40:08.000Z (over 3 years ago)
- Last Synced: 2024-10-05T03:28:45.239Z (about 1 month ago)
- Topics: email-body-parsing, typescript
- Language: TypeScript
- Size: 125 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# email-body-cleaner
Module designed to extract latest message from email body.
Currently guaranteed working if sender's mail client is `GMail` or `Outlook`**Note** Module still in development, and not tested properly, so use it at your own risk 🙃
## Installation
Just type
`npm i email-body-cleaner`## Usage example
```javascript
import { parseRaw } from 'email-body-cleaner'; // commonJs style
const parser = require('email-body-cleaner'); // standard require styleconst exampleBody = `Understood! Thanks mate !
------------------------------
*From:* somename lastname
*Sent:* Tuesday, November 12, 2019 6:07 PM
*To:* [email protected]
*Subject:* Fwd: Urgent thing---------- Forwarded message ---------
From: *anothername anotherlastname*
Date: Tue, Nov 12, 2019 at 1:10 PM
Subject: Re: Another urgent thing
To:Burning deadline
On Tue, Nov 12, 2019 at 11:51 anothername anotherlastname wrote:`;
const result = parseRaw(exampleBody); // parser.parseRaw(exampleBody);
console.log(result); // Will print: Understood! Thanks mate !
```
## Contributing
If you're interested in helping me to improve / add functionality, I'm kindly welcome you 🤗
Please feel free to send PR - s with your awesome code.