mail

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2019 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendMail

func SendMail(recipient string, subject, body string, ctx context.Context) error

SendMail is the easiest way to send a mail. It gets the SMTP information from the config file.

Types

type Mail

type Mail struct {
	SmtpAddress  string
	SmtpPort     string
	SmtpUser     string
	SmtpPassword string
	Sender       string
	Recipient    string
	Subject      string
	Body         string
}

Mail contains the data necessary to send a mail.

func (Mail) Send

func (m Mail) Send(ctx context.Context) error

Send provides a way to send a mail with SMTP information from the Mail structure.

Jump to

Keyboard shortcuts

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