email

package
v0.0.0-...-fab9456 Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(options ...Option) alertcenter.IAlertSender

Types

type Option

type Option func(*Sender)

func WithHost

func WithHost(host string) Option

func WithPort

func WithPort(p int) Option

func WithSenderEmail

func WithSenderEmail(email string) Option

func WithSenderName

func WithSenderName(name string) Option

func WithTLSInsecureSkipVerify

func WithTLSInsecureSkipVerify(insecure bool) Option

func WithUsernamePassword

func WithUsernamePassword(username string, password string) Option

type Sender

type Sender struct {
	// Host represents the host of the SMTP server.
	Host string
	// Port represents the port of the SMTP server.
	Port int
	// Username is the username to use to authenticate to the SMTP server
	Username string
	// Password is the password to use to authenticate to the SMTP server
	Password string
	// SenderName is the email sender's name
	SenderName string
	// SenderEmail is the email sender's email address
	SenderEmail string
	// bypass the verification of the server's certificate chain and host name
	TLSInsecureSkipVerify bool
}

func (Sender) Send

func (s Sender) Send(message alertcenter.Message) error

Jump to

Keyboard shortcuts

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