Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMockDialer ¶
Types ¶
type Config ¶
type Config struct {
SMTPHost string `yaml:"smtp_host" mapstructure:"smtp_host"`
SMTPPort int `yaml:"smtp_port" mapstructure:"smtp_port"`
SMTPUsername string `yaml:"smtp_username" mapstructure:"smtp_username"`
SMTPPassword string `yaml:"smtp_password" mapstructure:"smtp_password"`
SMTPInsecure bool `yaml:"smtp_insecure" mapstructure:"smtp_insecure" default:"true"`
Headers map[string]string `yaml:"headers" mapstructure:"headers"`
// SMTP TLS policy to use when establishing a connection.
// Defaults to MandatoryStartTLS.
// Possible values are:
// opportunistic: Use STARTTLS if the server supports it, otherwise connect without encryption.
// mandatory: Always use STARTTLS.
// none: Never use STARTTLS.
SMTPTLSPolicy string `yaml:"smtp_tls_policy" mapstructure:"smtp_tls_policy" default:"mandatory"`
}
func (Config) TLSPolicy ¶ added in v0.8.11
func (c Config) TLSPolicy() mail.StartTLSPolicy
type DialerImpl ¶
type DialerImpl struct {
// contains filtered or unexported fields
}
func NewDialerImpl ¶
func NewDialerImpl(SMTPHost string, SMTPPort int, SMTPUser string, SMTPPass string, SMTPInsecure bool, headers map[string]string, tlsPolicy mail.StartTLSPolicy) *DialerImpl
func (DialerImpl) DialAndSend ¶
func (m DialerImpl) DialAndSend(msg *mail.Message) error
func (DialerImpl) FromHeader ¶
func (m DialerImpl) FromHeader() string
FromHeader returns the headers to be added to the mail as from field
Click to show internal directories.
Click to hide internal directories.