mirror of
https://github.com/bjdgyc/anylink.git
synced 2025-08-10 04:58:12 +08:00
发送邮件增加ssl功能
This commit is contained in:
@@ -68,7 +68,9 @@ func SendMail(subject, to, htmlBody string) error {
|
||||
server.Port = dataSmtp.Port
|
||||
server.Username = dataSmtp.Username
|
||||
server.Password = dataSmtp.Password
|
||||
// server.Encryption = mail.EncryptionTLS
|
||||
if dataSmtp.UseSSl {
|
||||
server.Encryption = mail.EncryptionSSL
|
||||
}
|
||||
|
||||
// Since v2.3.0 you can specified authentication type:
|
||||
// - PLAIN (default)
|
||||
|
Reference in New Issue
Block a user