email

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitSMTPDialer

func InitSMTPDialer(host, username, password string, port int)

func Send

func Send(c *Context) (err error)

Types

type Context

type Context struct {
	ToList  []Role `json:"to_list"`  // 收件人列表
	CcList  []Role `json:"cc_list"`  // 抄送列表
	BccList []Role `json:"bcc_list"` // 密送列表
	Subject string `json:"subject"`  // 邮件主题
	Body    string `json:"body"`     // 邮件正文
	Path    string `json:"path"`     // 附件路径
}

type Role

type Role struct {
	Name    string `json:"name"`
	Address string `json:"address"`
}

type SMTPDialer

type SMTPDialer struct {
	Host     string `ini:"host"`
	Port     int    `ini:"port"`
	Username string `ini:"username"`
	Password string `ini:"password"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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