mail

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Log = logrus.New()
)

Functions

func ConfigureLogger

func ConfigureLogger(level logrus.Level, prod bool)

ConfigureLogger toggles debugging and adds full timestamps in production mode

func GenerateErrorMail

func GenerateErrorMail(errs []error, msg string, service string) hermes.Email

func GenerateResolvedNotificationMail

func GenerateResolvedNotificationMail(service string) hermes.Email

func InitMailer

func InitMailer(smtpServer, smtpUser, smtpPassword, from string, smtpPort int, to []string)

InitMailer returns a new mailer instance

func IsInitialized

func IsInitialized() bool

func Send

func Send(to string, subject string, mail hermes.Email)

Send handles dispatching an email to the specified receiver

func SendMails

func SendMails(subject string, mail hermes.Email)

Types

type Mailer

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

Mailer handles sending email to the configured SMTP server

Jump to

Keyboard shortcuts

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