email

package
v0.0.0-...-4ea7438 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(ep *EmailParam)

Init Init

func SendEmail

func SendEmail(subject, body string)

SendEmail body支持html格式字符串

Types

type EmailParam

type EmailParam struct {
	// ServerHost 邮箱服务器地址,如腾讯企业邮箱为smtp.exmail.qq.com
	ServerHost string
	// ServerPort 邮箱服务器端口,如腾讯企业邮箱为465
	ServerPort int
	// FromEmail 发件人邮箱地址
	FromEmail string
	// FromPasswd 发件人邮箱密码(注意,这里是明文形式),TODO:如果设置成密文?
	FromPasswd string
	// Toers 接收者邮件,如有多个,则以英文逗号(“,”)隔开,不能为空
	Toers string
	// CCers 抄送者邮件,如有多个,则以英文逗号(“,”)隔开,可以为空
	CCers string
}

EmailParam EmailParam

Jump to

Keyboard shortcuts

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