email

package
v0.0.0-...-5bb0c7b Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attachment

type Attachment struct {
	Filename    string
	Data        []byte
	Inline      bool
	ContentType string
}

type Mail

type Mail struct {
	// contains filtered or unexported fields
}

func New

func New(smtpServer, password string, mailAddress *mail.Address) *Mail

func (*Mail) Send

func (m *Mail) Send(title, body string, toEmail []*mail.Address) error

func (*Mail) SendWithAttachment

func (m *Mail) SendWithAttachment(title, body string, toEmail []*mail.Address, attachment []*Attachment) error

the email format see https://support.microsoft.com/zh-cn/kb/969854 https://tools.ietf.org/html/rfc1341

Jump to

Keyboard shortcuts

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