emailclient

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Email

type Email struct {
	// 主题
	Subject string
	// 接收人
	To []string
	// 正文
	Body string
	// 附件
	AttachFiles []string
	// 邮件内容类型
	MailType MailType
}

type EmailClient added in v0.4.3

type EmailClient struct {
	// contains filtered or unexported fields
}

func New

func New(serverAddr, authPassWord string, senderAddr mail.Address) (*EmailClient, error)

func (*EmailClient) SSend added in v0.4.3

func (emailC *EmailClient) SSend(email Email) error

SSend 使用SSL协议安全的发送,部分服务器会有此限制,普通发送不成功

func (*EmailClient) Send added in v0.4.3

func (emailC *EmailClient) Send(email Email) error

Send 使用非加密方式发送

type MailType

type MailType string
const (
	MailText MailType = "plain"
	MailHtml MailType = "html"
)

Jump to

Keyboard shortcuts

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