1
mirror of https://gitlab.com/commento/commento.git synced 2025-06-29 22:56:37 -04:00

api: add new config SMTP_PORT

This commit is contained in:
Adhityaa
2018-06-09 15:22:49 +05:30
parent 9d5e4f9f96
commit c794c40392
5 changed files with 6 additions and 3 deletions

View File

@ -18,7 +18,7 @@ func smtpOwnerResetHex(to string, toName string, resetHex string) error {
var body bytes.Buffer
templates["reset-hex"].Execute(&body, &ownerResetHexPlugs{Origin: os.Getenv("ORIGIN"), ResetHex: resetHex})
err := smtp.SendMail(os.Getenv("SMTP_HOST"), smtpAuth, os.Getenv("SMTP_FROM_ADDRESS"), []string{to}, concat(header, body))
err := smtp.SendMail(os.Getenv("SMTP_HOST") + ":" + os.Getenv("SMTP_PORT"), smtpAuth, os.Getenv("SMTP_FROM_ADDRESS"), []string{to}, concat(header, body))
if err != nil {
logger.Errorf("cannot send reset email: %v", err)
return errorCannotSendEmail