mail

package
v0.0.0-...-e150fe6 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

Types

type Attachment

type Attachment struct {
	FilePath string  // 文件绝对路径
	FileName string  // 附件名
	Data     *[]byte // 文件字节数组
	// contains filtered or unexported fields
}

Attachment 附件数据结构, 在下列模式中二选一, 同时存在时 1 文件路径模式 : FilePath 存在, 默认附件显示名字为路径中的文件名, 可指定 FileName 为附件显示名字 2 文件名+文件内容模式 : FileName 和 Data 同时存在

type Email

type Email struct {
	Subject     string        // 邮件主题, 必须
	Content     string        // 邮件内容, 必须
	Attachments []*Attachment // 附件
	To          []string      // 接收地址, 必须
	Cc          []string      // 抄送地址
}

func (*Email) Send

func (e *Email) Send() error

Send 发送邮件

Jump to

Keyboard shortcuts

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