gemail

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	From string
	To   []string
	Cc   []string
	Bcc  []string
	// contains filtered or unexported fields
}

Message ...

func NewHTMLMessage

func NewHTMLMessage(subject string, body string) *Message

NewHTMLMessage returns a new Message that can compose an HTML email with attachments

func NewMessage

func NewMessage(subject string, body string) *Message

NewMessage returns a new Message that can compose an email with attachments

func (*Message) Attach

func (m *Message) Attach(file string) error

Attach a file to email by ouline

func (*Message) Inline

func (m *Message) Inline(file string) error

Inline attach a file to email by inline

func (*Message) Send

func (m *Message) Send(addr string, auth smtp.Auth) error

Send message to smtp server

func (*Message) Tolist

func (m *Message) Tolist() []string

Tolist returns all the recipients of the email

Jump to

Keyboard shortcuts

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