Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SmtpClients ¶
type SmtpClients struct {
// contains filtered or unexported fields
}
func NewSmtpClients ¶
func NewSmtpClients(config SmtpServerList) (*SmtpClients, error)
func (*SmtpClients) SendMail ¶
func (sc *SmtpClients) SendMail( to []string, subject string, htmlContent string, overrides *messagingTypes.HeaderOverrides, ) error
type SmtpServer ¶
type SmtpServer struct {
Host string `yaml:"host"`
Port string `yaml:"port"`
Connections int `yaml:"connections"`
InsecureSkipVerify bool `yaml:"insecureSkipVerify"`
AuthData struct {
Username string `yaml:"user"`
Password string `yaml:"password"`
} `yaml:"auth"`
SendTimeout int `yaml:"sendTimeout"`
}
func (*SmtpServer) GetHost ¶
func (s *SmtpServer) GetHost() string
GetHost returns the hostname of the SMTP server
func (*SmtpServer) GetPort ¶
func (s *SmtpServer) GetPort() string
GetPort returns the port of the SMTP server
func (*SmtpServer) SetPassword ¶
func (s *SmtpServer) SetPassword(password string)
SetPassword sets the password for SMTP authentication
func (*SmtpServer) SetUsername ¶
func (s *SmtpServer) SetUsername(username string)
SetUsername sets the username for SMTP authentication
type SmtpServerList ¶
type SmtpServerList struct {
Servers []SmtpServer `yaml:"servers"`
From string `yaml:"from"`
Sender string `yaml:"sender"`
ReplyTo []string `yaml:"replyTo"`
}
func (*SmtpServerList) ReadFromFile ¶
func (sl *SmtpServerList) ReadFromFile(fname string) (err error)
Click to show internal directories.
Click to hide internal directories.