Registry / utility / mcnijman-go-emailaddress

mcnijman-go-emailaddress

JSON →
library1.1.1gogounverified

Provides email address finding, parsing, and validation using RFC 5322 regex and optional host verification.

go get github.com/mcnijman/go-emailaddress
INSTALL
IMPORT
SIG · MCNIJMAN-GO-EMAILA
M
mcnijman-go-emailaddress
utilitygov1.1.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

emailaddress
github.com/mcnijman/go-emailaddress

Parses an email address and prints its local part and domain.

package main import ( "fmt" "github.com/mcnijman/go-emailaddress" ) func main() { email, err := emailaddress.Parse("user@example.com") if err != nil { fmt.Println(err) return } fmt.Println(email.LocalPart, email.Domain) }
Debug
Known issues
gotchaHost validation contacts the mail server, which is slow and may not guarantee existence.
fix
Use host validation only when necessary, and be aware it may block or timeout.
affects: all
Upgrade
Version history
1.1.1latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
mcnijman-go-emailaddress — go get mcnijman-go-emailaddress · libregistry