mailer

package
v0.0.0-...-4877560 Latest Latest
Warning

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

Go to latest
Published: May 12, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorHandler

type ErrorHandler func(err error)

ErrorHandler is called when an error occurs, it guarantees that err is not nil

type Mailer

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

func NewMailer

func NewMailer(l *zerolog.Logger, errHandler ErrorHandler) *Mailer

NewMailer creates new Mailer, it setup listeners and returns created instace

func (*Mailer) Close

func (m *Mailer) Close()

Close stops the mailer service, it will cancell all queued tasks and waits for tasks in progress to complete before returning

func (*Mailer) Send

func (m *Mailer) Send(recipients []string, subject, data []byte)

Send emits event to send an email

Jump to

Keyboard shortcuts

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