代码拉取完成,页面将自动刷新
package email
import (
"strconv"
)
type Secret string
// EmailServer 邮箱服务器
type EmailServer struct {
Host string
Port int
Ssl bool
}
// String return host:port
func (s *EmailServer) String() string {
return s.Host + ":" + strconv.Itoa(s.Port)
}
var (
// TencentEnterpriseSMTPServer 腾讯企业邮箱服务器
TencentEnterpriseSMTPServer = EmailServer{Host: "smtp.exmail.qq.com", Port: 465, Ssl: true}
)
// EmailConfig configures notifications via mail.
type EmailConfig struct {
From string `yaml:"from,omitempty" json:"from,omitempty"` // 发件人
To string `yaml:"to,omitempty" json:"to,omitempty"` // 收件人
Cc string `yaml:"cc,omitempty" json:"cc,omitempty"` // 抄送人
Bcc string `yaml:"bcc,omitempty" json:"bcc,omitempty"` // 密送人
EmailServer EmailServer `yaml:"email_server,omitempty" json:"email_server,omitempty"` // 邮箱服务器
AuthUsername string `yaml:"auth_username,omitempty" json:"auth_username,omitempty"` // 邮箱账号
AuthPassword Secret `yaml:"auth_password,omitempty" json:"auth_password,omitempty"` // 邮箱密码
AuthSecret Secret `yaml:"auth_secret,omitempty" json:"auth_secret,omitempty"` // 邮箱
Subject string `yaml:"subject,omitempty" json:"subject"` // 主题
Template string `yaml:"tempalte,omitempty" json:"tempalte,omitempty"` // 模板字符串
TemplateFile string `yaml:"template_file,omitempty" json:"template_file,omitempty"` // 模板文件
Data map[string]interface{} `yaml:"data" json:"data"` // 内容
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。