fsmtp

package
v5.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

smtp服务.

Index

Examples

Constants

View Source
const QQ_MAIL_SERVER string = "smtp.qq.com:587"

QQ邮箱服务器.

Variables

This section is empty.

Functions

func MailEncode

func MailEncode(a string) string

字符串转义, &<>\n . 不要对同一字符串转义两次, 会出现非预期的情况.

func SendMail

func SendMail(
	server string,
	account string,
	password string,
	subject string,
	content string,
	to ...string) ftype.Error

发送邮件. 支持群发.

Example
var e error
SendMail(
	QQ_MAIL_SERVER,
	"iceyee.studio@qq.com",
	"ddaulujsexzlbidd",
	"测试-标题",
	"测试-内容.",
	"farmer.person@qq.com",
	"709565591@qq.com")
fassert.CheckError(e, "发送邮件.")
return
Output:

Types

This section is empty.

Jump to

Keyboard shortcuts

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