https://github.com/darnfish/email-forward-parser
Parses forwarded emails and extracts original content
https://github.com/darnfish/email-forward-parser
email forward mail parser
Last synced: about 1 year ago
JSON representation
Parses forwarded emails and extracts original content
- Host: GitHub
- URL: https://github.com/darnfish/email-forward-parser
- Owner: darnfish
- License: mit
- Created: 2023-07-11T17:12:22.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-01T20:05:25.000Z (over 2 years ago)
- Last Synced: 2025-03-26T10:21:16.017Z (about 1 year ago)
- Topics: email, forward, mail, parser
- Language: Go
- Homepage: https://pkg.go.dev/github.com/darnfish/email-forward-parser
- Size: 104 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# email-forward-parser
[](https://pkg.go.dev/github.com/darnfish/email-forward-parser)
[](https://github.com/darnfish/email-forward-parser/actions/workflows/test.yml)
[](https://codecov.io/gh/darnfish/email-forward-parser)
Parses forwarded emails and extracts original content.
This is a Go port of [crisp-oss/email-forward-parser](https://github.com/crisp-oss/email-forward-parser).
## Who uses it?
Pickup
## Installation
```
go get "https://github.com/darnfish/email-forward-parser"
```
## Usage
```go
import efp "github.com/darnfish/email-forward-parser"
result := efp.Read(body, subject)
log.Println(result.Forwarded) // true
log.Println(result)
// {
// Forwarded: true,
// Message: "Praesent suscipit egestas hendrerit.",
// Email: {
// Body: "Aenean quis diam urna.",
// From: {
// Name: "John Doe",
// Address: "john.doe@acme.com"
// },
// To: [{
// Name: "Bessie Berry",
// Address: "bessie.berry@acme.com"
// }],
// CC: [{
// Name: "Walter Sheltan",
// Address: "walter.sheltan@acme.com"
// }],
// Subject: "Integer consequat non purus",
// Date: "25 October 2021 at 11:17:21 EEST"
// }
// }
```
## Licence
MIT