Documentation
¶
Overview ¶
Package emailaddr checks and classifies email addresses for the audience and the importer: syntax, role addresses, disposable domains, likely typos, spam-trap-like patterns, mailbox providers and masking.
Index ¶
- Constants
- Variables
- func Check(s string) (string, string)
- func Domain(email string) string
- func HostingFromMX(host string) string
- func IsDisposable(domain string) bool
- func IsRole(email string) bool
- func Local(email string) string
- func MailboxName(key string) string
- func MailboxProvider(domain string) string
- func Mask(email string) string
- func Normalize(s string) string
- func TrapLike(email string) bool
- func TypoFix(domain string) (string, bool)
- func Valid(s string) bool
Constants ¶
const ( ProblemNoDomain = "no domain" ProblemDoubleDot = "double dot" ProblemNotAnAddress = "not an address" ProblemTooLong = "too long" )
Problems returned by Check. They are short phrases shown next to the raw value in import previews and reports.
const ( Gmail = "gmail" Outlook = "outlook" Yahoo = "yahoo" ICloud = "icloud" Other = "other" )
Mailbox providers, in the order the charts use.
Variables ¶
MailboxProviders lists the keys in chart order.
Functions ¶
func Check ¶
Check normalizes s and reports why it isn't a deliverable address, or "" when the syntax is fine. It does not look up DNS.
func HostingFromMX ¶
HostingFromMX names the hosting of a domain from one of its MX hosts: "Google Workspace", "Microsoft 365", "Fastmail", "Proton", "Zoho Mail".
func IsDisposable ¶
IsDisposable reports whether domain belongs to a temporary-inbox service.
func MailboxName ¶
MailboxName is the display name of a mailbox provider key.
func MailboxProvider ¶
MailboxProvider classifies a domain into the mailbox provider that filters its mail. Hosted domains (Google Workspace, Microsoft 365) stay "other"; their hosting is found from MX records (see HostingFromMX).
func TrapLike ¶
TrapLike reports addresses that look like spam traps: honeypot local parts and catch-all scraper patterns. HostRepute knows real trap networks; this is the offline heuristic.
Types ¶
This section is empty.