mail

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2019 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mail

type Mail struct {
	Message *email.Email
}

Mail exposes the Mail type.

func Create

func Create() *Mail

Create creates a new empty mail.

func (*Mail) AttachFile

func (m *Mail) AttachFile(filename string) *Mail

AttachFile attaches a file to the mail.

func (*Mail) Bcc

func (m *Mail) Bcc(bcc ...string) *Mail

Bcc determines the Blind carbon copy.

func (*Mail) Cc

func (m *Mail) Cc(cc ...string) *Mail

Cc determines the Carbon copy.

func (*Mail) From

func (m *Mail) From(from string) *Mail

From determines who the message is from (There is already a default value provided in the config here).

func (*Mail) HTML

func (m *Mail) HTML(html string) *Mail

HTML determines the message HTML (optional).

func (*Mail) Headers

func (m *Mail) Headers(headers textproto.MIMEHeader) *Mail

Headers determine the message headers.

func (*Mail) ReplyTo

func (m *Mail) ReplyTo(replyTo []string) *Mail

ReplyTo determines where the message will get replied to.

func (*Mail) Send

func (m *Mail) Send() error

Send sends the mail.

func (*Mail) SendNow added in v0.4.0

func (m *Mail) SendNow() error

SendNow sends the mail.

func (*Mail) Sender

func (m *Mail) Sender(sender string) *Mail

Sender override From as SMTP envelope sender (optional).

func (*Mail) Subject

func (m *Mail) Subject(subject string) *Mail

Subject determines the Carbon copy.

func (*Mail) Text

func (m *Mail) Text(text string) *Mail

Text determines the message plaintext (optional).

func (*Mail) To

func (m *Mail) To(to ...string) *Mail

To determines who the message is for.

Jump to

Keyboard shortcuts

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