Skip to content

Latest commit

 

History

History
59 lines (49 loc) · 1.66 KB

README.md

File metadata and controls

59 lines (49 loc) · 1.66 KB

email-forward-parser

Go Reference Build and Test codecov

Parses forwarded emails and extracts original content.

This is a Go port of crisp-oss/email-forward-parser.

Who uses it?

Pickup

Installation

go get "https://github.com/darnfish/email-forward-parser"

Usage

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