Documentation
¶
Index ¶
Constants ¶
View Source
const TempForgetPassword = `
您的账号{{.Username}}正在重置密码,验证码为 {{.Code}},有效期15分钟!
`
View Source
const TempRegister = `
您好{{.Username}},欢迎注册我的博客平台。您的验证码为 {{.Code}},有效期15分钟!
`
View Source
const TempSimpleCode = `` /* 4417-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CaptchaEmail ¶
验证码邮件内容
type EmailContent ¶
type EmailContent struct {
Title string `json:"title"` // 标题
HeadBg string `json:"head_bg"` // 头部背景图
HeadTips string `json:"head_tips"` // 头部提示
DearUser string `json:"dear"` // 亲爱的用户
Content string `json:"content"` // 内容
ButtonTips string `json:"button_tips"` // 按钮提示
ButtonLink string `json:"button_url"` // 按钮链接
ContactUs string `json:"contact_us"` // 联系我们
ContactLink string `json:"contact_link"` // 联系链接
}
func NewEmailContent ¶
func NewEmailContent() *EmailContent
type EmailMessage ¶
type EmailSender ¶
type EmailSender struct {
Host string // 服务器地址
Port int // 端口
Username string // 发件人
Password string // 密钥
Nickname string // 发件人昵称
Deliver []string // 抄送邮箱:多个以英文逗号分隔
IsSSL bool // 是否使用 SSL/TLS
}
func NewEmailSender ¶
func NewEmailSender(cfg *properties.Email) *EmailSender
func (*EmailSender) SendEmailMessage ¶
func (s *EmailSender) SendEmailMessage(message EmailMessage) error
Click to show internal directories.
Click to hide internal directories.