email

package
v0.0.0-...-afa1935 Latest Latest
Warning

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

Go to latest
Published: May 8, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientType

type ClientType struct {
	Host     string       // smtp地址
	Port     int          // 端口
	Username string       // 用户名
	Password string       // 密码
	Message  *MessageType // 消息
}

ClientType 发送客户端

func NewClient

func NewClient(host string, port int, username string, password string, message *MessageType) *ClientType

NewClient 返回一个邮件客户端 host smtp地址 port 端口 username 用户名 password 密码 message 消息

func (*ClientType) SendMessage

func (client *ClientType) SendMessage() (bool, error)

SendMessage 发送邮件

type MessageType

type MessageType struct {
	From        string   // 发件人
	To          []string // 收件人
	Cc          []string // 抄送人
	Subject     string   // 主题
	Attach      string   // 附件
	ContentType string   // 内容的类型 text/plain text/html
	Content     string   // 内容
}

MessageType 内容

Jump to

Keyboard shortcuts

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