mail

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2020 License: GPL-3.0 Imports: 10 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 SendMail

func SendMail(opts *Opts)

SendMail puts a mail in the queue

func SendMailWithTemplate

func SendMailWithTemplate(to, subject, tpl string, data map[string]interface{})

SendMailWithTemplate parses a template and sends it via mail

func SendTestMail added in v0.14.0

func SendTestMail(to string) 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 {
	To          string
	Subject     string
	Message     string
	HTMLMessage string
	ContentType ContentType
	Boundary    string
	Headers     []*header
}

Opts holds infos for a mail

type Template

type Template struct {
	Templates *template.Template
}

Template holds a pointer about a template

Jump to

Keyboard shortcuts

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