feat: now supports custom smtp port

This commit is contained in:
JustSong committed 2023-05-12 11:44:38 +08:00
1 parent b14b400509
commit d11134d98f
9 files changed
+58 -38

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@ func SendEmail(subject string, receiver string, content string) error {
m.SetHeader("To", receiver)
m.SetHeader("Subject", subject)
m.SetBody("text/html", content)
d := gomail.NewDialer(SMTPServer, 587, SMTPAccount, SMTPToken)
d := gomail.NewDialer(SMTPServer, SMTPPort, SMTPAccount, SMTPToken)
err := d.DialAndSend(m)
return err
}