mail

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2021 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Queue chan *gomail.Message

Queue is the mail queue

Functions

func AssertSent added in v0.17.0

func AssertSent(t *testing.T, opts *Opts)

AssertSent asserts if a mail has been sent

func Fake added in v0.17.0

func Fake()

Fake stops any mails from being sent and instead allows for recording and querying them.

func SendMail

func SendMail(opts *Opts)

SendMail puts a mail in the queue

func SendTestMail added in v0.14.0

func SendTestMail(opts *Opts) error

SendTestMail sends a test mail to a receipient. It works without a queue.

func StartMailDaemon

func StartMailDaemon()

StartMailDaemon starts the mail daemon

func StopMailDaemon

func StopMailDaemon()

StopMailDaemon closes the mail queue channel, aka stops the daemon

Types

type ContentType

type ContentType int

ContentType represents mail content types

const (
	ContentTypePlain ContentType = iota
	ContentTypeHTML
	ContentTypeMultipart
)

Enumerate all the team rights

type Opts

type Opts struct {
	From        string
	To          string
	Subject     string
	Message     string
	HTMLMessage string
	ContentType ContentType
	Boundary    string
	Headers     []*header
}

Opts holds infos for a mail

Jump to

Keyboard shortcuts

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