mail

package
v0.1.19 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HostQQMail = "smtp.qq.com"
	PortQQMail = "25"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Mail

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

func Auth

func Auth(username, password, host, port string) *Mail

Auth authenticates the identity In particular, the password is the authorization code, not your email password

func (*Mail) Html

func (mail *Mail) Html(to []string, msg string) error

Html send mail in a html format

func (*Mail) Plain

func (mail *Mail) Plain(to []string, msg string) error

Plain send mail in a plain format

func (*Mail) SetBCC

func (mail *Mail) SetBCC(BCC []string) *Mail

func (*Mail) SetCC

func (mail *Mail) SetCC(CC []string) *Mail

func (*Mail) SetFrom added in v0.1.11

func (mail *Mail) SetFrom(from string) *Mail

func (*Mail) SetSubject

func (mail *Mail) SetSubject(subject string) *Mail

type Message

type Message struct {
	From string `json:"From"`
	To   string `json:"To"`
	// 抄送
	CC string `json:"Cc"`
	// 暗抄送
	BCC         string `json:"Bcc"`
	Subject     string `json:"Subject"`
	ContentType string `json:"Content-Type"`
	Date        string `json:"Date"`
}

Jump to

Keyboard shortcuts

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