mailer

package
v0.0.5-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingSettings = errors.New("the mailer settings are nil or incomplete")
	ErrNoRecipient     = errors.New("no recipient was supplied")
)

Functions

func SendEmail2

func SendEmail2(settings map[string]string, body string, subject string, to, attachments []string) error

SendEmail2 sends and email, as well

Types

type EmailSubject

type EmailSubject string

EmailSubject defines different types of email messages

const (
	SubjAccountCreated        EmailSubject = "Tiny Build Server: Your account was created"
	SubjAccountLocked         EmailSubject = "Tiny Build Server: Your account has been locked"
	SubjConfirmRegistration   EmailSubject = "Tiny Build Server: Please confirm your registration"
	SubjRequestNewPassword    EmailSubject = "Tiny Build Server: Instructions on how to reset your password"
	SubjRegistrationConfirmed EmailSubject = "Tiny Build Server: Your registration was successfully confirmed"
	SubjConfirmPasswordReset  EmailSubject = "Tiny Build Server: Your password has been reset"
	SubjNewDeployment         EmailSubject = "Tiny Build Server: New email deployment"
)

type Mailer

type Mailer struct {
	Settings map[string]string
}

func (*Mailer) SendEmail

func (mailer *Mailer) SendEmail(body string, subject string, to, attachments []string) error

SendEmail sends and email

Jump to

Keyboard shortcuts

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