mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-12 03:13:41 +08:00
feat: now supports custom smtp port
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user