Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: 15 days ago
JSON representation

Parses forwarded emails and extracts original content

Awesome Lists containing this project

README

        

# email-forward-parser
[![Go Reference](https://pkg.go.dev/badge/github.com/darnfish/email-forward-parser.svg)](https://pkg.go.dev/github.com/darnfish/email-forward-parser)
[![Build and Test](https://github.com/darnfish/email-forward-parser/actions/workflows/test.yml/badge.svg)](https://github.com/darnfish/email-forward-parser/actions/workflows/test.yml)
[![codecov](https://codecov.io/gh/darnfish/email-forward-parser/branch/main/graph/badge.svg?token=P8KQD92JZH)](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: "[email protected]"
// },
// To: [{
// Name: "Bessie Berry",
// Address: "[email protected]"
// }],
// CC: [{
// Name: "Walter Sheltan",
// Address: "[email protected]"
// }],
// Subject: "Integer consequat non purus",
// Date: "25 October 2021 at 11:17:21 EEST"
// }
// }
```

## Licence
MIT