email

package
v0.0.0-...-a4d1c61 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const CharSet = "UTF-8"

CharSet is the default email encoding.

Variables

View Source
var (
	// ErrEmptyRecipientList is returned when an empty recipient list is passed to the Sender.Send method.
	ErrEmptyRecipientList = errors.New("empty recipient list")
	// ErrEmptySender is returned when an empty sender email address is passed to the Sender.Send method.
	ErrEmptySender = errors.New("empty sender")
	// ErrInvalidSender is returned when an invalid email address is passed to the Sender.Send method.
	ErrInvalidSender = errors.New("invalid sender")
	// ErrInvalidRecipient is returned when an invalid email is passed in the list of recipients to the Sender.Send method.
	ErrInvalidRecipient = errors.New("invalid recipient")
	// ErrInvalidData is returned when an invalid data is passed to the Sender.Send method.
	ErrInvalidData = errors.New("invalid data")
)

Functions

func ValidateEmail

func ValidateEmail(email string) bool

ValidateEmail validates the given email. It returns false if the validation fails.

Types

type Sender

type Sender interface {
	Send(recipients []string, sender, subject, template string, data interface{}) error
}

Sender has a method to send emails.

Directories

Path Synopsis
ses

Jump to

Keyboard shortcuts

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