mirror of
https://github.com/bjdgyc/anylink.git
synced 2025-08-08 21:02:33 +08:00
修复邮箱图片显示逻辑,兼容 google gmail
This commit is contained in:
@@ -43,7 +43,7 @@ func GetJwtData(jwtToken string) (map[string]interface{}, error) {
|
||||
return claims, nil
|
||||
}
|
||||
|
||||
func SendMail(subject, to, htmlBody string) error {
|
||||
func SendMail(subject, to, htmlBody string, attach *mail.File) error {
|
||||
|
||||
dataSmtp := &dbdata.SettingSmtp{}
|
||||
err := dbdata.SettingGet(dataSmtp)
|
||||
@@ -102,6 +102,10 @@ func SendMail(subject, to, htmlBody string) error {
|
||||
AddTo(to).
|
||||
SetSubject(subject)
|
||||
|
||||
if attach != nil {
|
||||
email.Attach(attach)
|
||||
}
|
||||
|
||||
email.SetBody(mail.TextHTML, htmlBody)
|
||||
|
||||
// Call Send and pass the client
|
||||
|
Reference in New Issue
Block a user