mailer

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SyncMailerIndicator = -1 // Indicator for synchronous mailer
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Mailer

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

Mailer can send mail asynchronously with a queue, or synchronously

func New

func New(from, pass, host, port string, queueSize int) *Mailer

Create a new mailer, set queueSize to SyncMailerIndicator to send mail synchronously

func (*Mailer) Send

func (m *Mailer) Send(to, subject, content string) error

Send a mail, if the mailer is synchronous, the function will block until the mail is sent, otherwise it will return nil immediately

Jump to

Keyboard shortcuts

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