commit | 8f0c9dd4e51ce290b81d2ada99b7769903267e79 | [log] [tgz] |
---|---|---|
author | Dusan Kasan <me@dusankasan.com> | Thu Apr 13 10:49:32 2017 +0200 |
committer | Dusan Kasan <me@dusankasan.com> | Thu Apr 13 10:49:32 2017 +0200 |
tree | 38a3a65b057d0e6e7c0161d08fb26c80d3ba1d3c | |
parent | c2129de1b7f74068fc6c77fad239d1a171359195 [diff] |
Status and coverage badges added
This library allows for parsing an email message into a more convenient form than the net/mail
provides. Where the net/mail
just gives you a map of header fields and a io.Reader
of its body, Parsemail allows access to all the standard header fields set in RFC5322, html/text body as well as attachements/embedded content as binary streams with metadata.
var reader io.Reader // this reads an email message email, err := parsemail.Parse(reader) // returns Email struct and error if err != nil { // handle error } fmt.Println(email.Subject) fmt.Println(email.From) fmt.Println(email.To) fmt.Println(email.HTMLBody)
It is missing some tests, and needs more work. Use at your own discretion.