Documentation ¶
Index ¶
Constants ¶
const ( ErrUnexpectedResponse = "Unexpected response from deliverabler" // Standard Errors ErrTimeout = "The connection to the mail server has timed out" ErrNoSuchHost = "Mail server does not exist" ErrBlocked = "Blocked by mail server" // RCPT Errors ErrTryAgainLater = "Try again later" ErrFullInbox = "Recipient out of disk space" ErrTooManyRCPT = "Too many recipients" ErrNoRelay = "Not an open relay" ErrMailboxBusy = "Mailbox busy" ErrExceededMessagingLimits = "Messaging limits have been exceeded" ErrNotAllowed = "Not Allowed" ErrNeedMAILBeforeRCPT = "Need MAIL before RCPT" ErrRCPTHasMoved = "Recipient has moved" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct { Address string `json:"address" xml:"address"` Username string `json:"username" xml:"username"` Domain string `json:"domain" xml:"domain"` MD5Hash string `json:"md5Hash" xml:"md5Hash"` }
Address stores all information about an email Address
func ParseAddress ¶
ParseAddress attempts to parse an email address and return it in the form of an Address struct pointer - domain case insensitive
type Deliverabler ¶
type Deliverabler struct {
// contains filtered or unexported fields
}
Deliverabler contains the context and smtp.Client needed to check email address deliverability
func NewDeliverabler ¶
func NewDeliverabler(domain, hostname, sourceAddr string) (*Deliverabler, error)
NewDeliverabler generates a new Deliverabler reference
func (*Deliverabler) Close ¶
func (d *Deliverabler) Close()
Close closes the Deliverablers SMTP client connection
func (*Deliverabler) HasCatchAll ¶
func (d *Deliverabler) HasCatchAll(retry int) bool
HasCatchAll checks the deliverability of a randomly generated address in order to verify the existence of a catch-all
func (*Deliverabler) IsDeliverable ¶
func (d *Deliverabler) IsDeliverable(email string, retry int) error
IsDeliverable takes an email address and performs the operation of adding the email to the envelope. It also receives a number of retries to reconnect to the MX server before erring out. If a 250 is received the email is valid
type Disposabler ¶
type Disposabler struct {
// contains filtered or unexported fields
}
Disposabler contains the map of known disposable email domains
func NewDisposabler ¶
func NewDisposabler(client *httpclient.Client) *Disposabler
NewDisposabler creates a new Disposabler and starts a domain farmer that retrieves all known disposable domains periodically
func (*Disposabler) IsDisposable ¶
func (d *Disposabler) IsDisposable(domain string) bool
IsDisposable tests whether a string is among the known set of disposable mailbox domains. Returns true if the address is disposable
type Free ¶
type Free struct {
// contains filtered or unexported fields
}
Free contains the map of known free email domains
func NewFree ¶
func NewFree(client *httpclient.Client) *Free
NewFree creates a new Free and starts a domain farmer that retrieves all known free domains periodically
type Lookup ¶
type Lookup struct { XMLName xml.Name `json:"-" xml:"lookup"` Address ValidFormat bool `json:"validFormat" xml:"validFormat"` Deliverable bool `json:"deliverable" xml:"deliverable"` FullInbox bool `json:"fullInbox" xml:"fullInbox"` HostExists bool `json:"hostExists" xml:"hostExists"` CatchAll bool `json:"catchAll" xml:"catchAll"` Disposable bool `json:"disposable" xml:"disposable"` Gravatar bool `json:"gravatar" xml:"gravatar"` Free bool `json:"free" xml:"free"` Role bool `json:"role" xml:"role"` }
Lookup contains all output data for an email verification Lookup
type LookupError ¶
type LookupError struct { Message string `json:"message" json:"message"` Details string `json:"details" json:"details"` }
LookupError is an error
func (*LookupError) Error ¶
func (e *LookupError) Error() string
Error satisfies the error interface
type Role ¶
type Role struct {
// contains filtered or unexported fields
}
Role contains the map of known role users emails
func NewRole ¶
func NewRole(client *httpclient.Client) *Role
NewRole creates a new Role and starts a domain farmer that retrieves all known role users emails periodically
type Verifier ¶
type Verifier struct {
// contains filtered or unexported fields
}
Verifier contains all dependencies needed to perform educated email verification lookups
func NewVerifier ¶
NewVerifier generates a new httpclient.Client using the passed timeout and then returns a new Verifier reference that will be used to Verify email addresses
func (*Verifier) Blacklisted ¶
Blacklisted is a parent blacklist checking method that returns true if our IP is blacklisted in any of the monitored blacklisting services
func (*Verifier) HasGravatar ¶
HasGravatar performs an http HEAD request to check if the email is associated with a gravatar account