Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoSPFRecords when no TXT/SPF records are found or parsed. ErrNoSPFRecords = errors.New("No SPF Records found.") )
Functions ¶
func GetDomainFromEmail ¶
GetDomainFromEmail returns the domain name from an email address. It is somewhat naive at present.
func NewSPFChecker ¶
func NewSPFChecker() *spfChecker
NewSPFChecker returns a SPF looker-upper with an internal cache. You should probably use the library's instance through the top-level functions.
func Validate ¶
Validate returns whether emails from a domain can be sent from a given IP. This is the intended main entry point to this library. If you have an email address, then use GetDomainFromEmail to get the domain. Results from Validate are simply cached in RAM; extended and heavy use may create a memory leak. If this is a problem, simply call the top-level DumpCache function.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.