mail

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Queue chan *mail.Msg

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 recipient. It works without a queue.

func StartMailDaemon

func StartMailDaemon()

StartMailDaemon starts the mail 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
	Embeds      map[string]io.Reader
	EmbedFS     map[string]*embed.FS
}

Opts holds infos for a mail

Jump to

Keyboard shortcuts

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