smtp_client

package
v0.0.0-...-4780336 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

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) Address

func (s *SmtpServer) Address() string

Address URI to smtp server

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL