memail

package
v0.0.2-alpha Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// HeaderFrom 发送
	HeaderFrom = "From"
	// HeaderTo 接收
	HeaderTo = "To"
	// HeaderCc 抄送
	HeaderCc = "Cc"
	// HeaderBcc 暗送
	HeaderBcc = "Bcc"
	// HeaderSubject 标题
	HeaderSubject = "Subject"
	// HeaderDate 时间
	HeaderDate = "X-Date"
)
View Source
const (
	ContentTypeHtml  = "text/html"
	ContentTypePlain = "text/plain"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EmailClient

type EmailClient struct {
	Host     string
	Port     int
	Username string
	Password string
	SSL      bool
	Auth     smtp.Auth
	MsgCh    chan EmailMessage
	// contains filtered or unexported fields
}

func NewEmailClient

func NewEmailClient(host string, port int, username string, password string, cacheNumber int) *EmailClient

func (*EmailClient) Close

func (ecli *EmailClient) Close() error

func (*EmailClient) Dial

func (ecli *EmailClient) Dial() (gomail.SendCloser, error)

func (*EmailClient) GoRun

func (ecli *EmailClient) GoRun()

func (*EmailClient) Send

func (ecli *EmailClient) Send(from string, to []string, msg io.WriterTo) error

type EmailMessage

type EmailMessage struct {
	Msg *gomail.Message
	FC  func(msg *gomail.Message, err error)
}

Jump to

Keyboard shortcuts

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