Initial commit
6 files changed
tree: 76218eb9b0322dbae8a4e0d119053945be9503dc
  1. CHANGELOG.md
  2. CONTRIBUTING.md
  3. LICENSE.md
  4. parsemail.go
  5. parsemail_test.go
  6. README.md
README.md

Parsemail - simple email parsing Go library

Simple usage:

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()) // not a method, parsed from header on demand
fmt.Println(email.Cc()) // not a method, parsed from header on demand
fmt.Println(email.HTMLBody) // this is not a method

This library is WIP.

It is missing some tests, and needs more work. Use at your own discretion.

TODO

  • CI
  • Readme with use cases
  • More tests for 100% coverage
  • email address type => getEmail, getName
  • quoted§ text?