Documentation
¶
Overview ¶
Package smtp is the built-in mail provider: one SMTP relay per channel, a connection per delivery, 5xx replies final.
Index ¶
Constants ¶
View Source
const ( TLSStartTLS = "starttls" TLSImplicit = "tls" TLSNone = "none" )
TLS modes.
Variables ¶
View Source
var ErrConfig = errors.New("smtp: invalid channel")
ErrConfig is an invalid channel.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Host string `json:"host" schemapb:"description=Relay host"`
Port int64 `json:"port" schemapb:"default=587;gte=1;lte=65535"`
// TLS: starttls (default), tls (implicit on connect), none.
TLS string `json:"tls" schemapb:"default=starttls;description=starttls, tls or none"`
Username string `json:"username,omitempty"`
Password config.Secret `json:"password,omitempty" schemapb:"secret=true"`
// From is the sender when the message names none.
From string `json:"from" schemapb:"description=Default sender, e.g. Shop <no-reply@shop.example>"`
}
Config of an SMTP channel.
Click to show internal directories.
Click to hide internal directories.