smtp

package
v3.13.3 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, emailConfig email.Config, smtpConfig Config) (email.Sender, error)

New creates a SMTP email provider.

Types

type Config

type Config struct {
	Address     string `name:"address" description:"SMTP server address"`
	Username    string `name:"username" description:"Username to authenticate with"`
	Password    string `name:"password" description:"Password to authenticate with"`
	Connections int    `name:"connections" description:"Maximum number of connections to the SMTP server"`
	TLSConfig   *tls.Config
}

Config for the SMTP email provider.

type SMTP

type SMTP struct {
	// contains filtered or unexported fields
}

SMTP is the type that implements SMTP as email provider.

func (*SMTP) Send

func (s *SMTP) Send(message *email.Message) error

Send an email message.

Jump to

Keyboard shortcuts

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