mail

package
v0.0.0-...-16c708a Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2019 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Credentials

type Credentials struct {
	User        string
	Password    string
	PermChecker *models.PermissionChecker
}

Credentials defines the information needed to connect to a mail account

type Message

type Message struct {
	Recipients []string `json:"recipients"`

	Subject string `json:"subject"`
	Body    string `json:"body"`
	// contains filtered or unexported fields
}

Message defines the information needed to send a message

func NewMessage

func NewMessage(credentials *Credentials, sender, body, subject string, recipients []string) *Message

NewMessage creates a new mail message from the given information

func NewMessageFromRequest

func NewMessageFromRequest(credentials *Credentials, r *http.Request) (*Message, error)

NewMessageFromRequest builds and returns a new message from the given credentials and http.Request. Consumes the given requests's body.

func NewMessageFromTemplate

func NewMessageFromTemplate(credentials *Credentials, tpl, subject string,
	tplVars interface{}, recipients []string) (*Message, error)

NewMessageFromTemplate creates a new

func (*Message) Send

func (m *Message) Send() error

Send sends "this" message

Jump to

Keyboard shortcuts

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