https://github.com/teamwork/mailaddress
Mail address parsing library for Go
https://github.com/teamwork/mailaddress
email go
Last synced: 11 months ago
JSON representation
Mail address parsing library for Go
- Host: GitHub
- URL: https://github.com/teamwork/mailaddress
- Owner: Teamwork
- License: mit
- Created: 2017-07-04T13:24:51.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-12-12T20:40:41.000Z (about 2 years ago)
- Last Synced: 2025-04-05T03:13:02.679Z (11 months ago)
- Topics: email, go
- Language: Go
- Homepage:
- Size: 52.7 KB
- Stars: 8
- Watchers: 47
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.com/Teamwork/mailaddress)
[](https://codecov.io/gh/Teamwork/mailaddress)
[](https://godoc.org/github.com/Teamwork/mailaddress)
[](https://goreportcard.com/report/github.com/Teamwork/mailaddress)
The mailaddress package parses email addresses.
It's an alternative to `net/mail`; significant differences include:
- Better errors.
- When parsing a list it will continue to the next address on an error; this is
especially useful when providing feedback to users.
- Some useful utility functions.
Basic example:
addr, err := mailaddress.Parse(`Martin `)
addrs, haveErr := mailaddress.ParseLint(`many@example.com, addresses@example.com`)
if haveErr {
fmt.Println(addrs.Errors())
}
See godoc for more docs.