Documentation
¶
Index ¶
Constants ¶
const DefaultAPIEndpoint = "https://api.nodemailer.com/user"
DefaultAPIEndpoint is Nodemailer's Ethereal account provisioning API.
const DefaultWebBase = "https://ethereal.email/message/"
DefaultWebBase is the web interface URL for viewing caught messages.
Variables ¶
This section is empty.
Functions ¶
func IsEtherealAddress ¶
IsEtherealAddress reports whether the given email address belongs to the ethereal.email domain.
func IsEtherealHost ¶
IsEtherealHost reports whether the given host name matches an Ethereal email host.
func MessageURL ¶
MessageURL returns the web URL to preview a captured message by its Message-ID.
Types ¶
type Account ¶
type Account struct {
Status string `json:"status,omitempty"`
User string `json:"user"`
Pass string `json:"pass"`
SMTP EndpointConfig `json:"smtp"`
IMAP EndpointConfig `json:"imap"`
POP3 EndpointConfig `json:"pop3"`
Web string `json:"web"`
MXEnabled bool `json:"mxEnabled,omitempty"`
}
Account holds generated Ethereal test credentials.
func CreateAccount ¶
CreateAccount calls the Ethereal API to provision a new disposable test account.
type EndpointConfig ¶
type EndpointConfig struct {
Host string `json:"host"`
Port int `json:"port"`
Secure bool `json:"secure"`
}
EndpointConfig holds connection coordinates for an email protocol.
func (EndpointConfig) Addr ¶
func (e EndpointConfig) Addr() string
Addr returns the "host:port" address string.
type Option ¶
type Option func(*Options)
Option modifies Options.
func WithEndpoint ¶
WithEndpoint overrides the provisioning API endpoint.
func WithHTTPClient ¶
WithHTTPClient overrides the HTTP client used for requests.
func WithRequestor ¶
WithRequestor customizes the client identification sent to Nodemailer.