|
|
@ -16,7 +16,7 @@ Content-Type: text/plain; charset="UTF-8"
|
|
|
|
`
|
|
|
|
`
|
|
|
|
header = fmt.Sprintf(header, from, to, subject)
|
|
|
|
header = fmt.Sprintf(header, from, to, subject)
|
|
|
|
mailTxt = header + mailTxt
|
|
|
|
mailTxt = header + mailTxt
|
|
|
|
auth := smtp.PlainAuth("", from, config.MailPass, config.MailSmtpServer)
|
|
|
|
auth := smtp.PlainAuth("", config.MailSmtpUser, config.MailPass, config.MailSmtpServer)
|
|
|
|
err := smtp.SendMail(config.MailSmtpServer+":"+config.MailSmtpPort, auth, from, []string{to}, []byte(mailTxt))
|
|
|
|
err := smtp.SendMail(config.MailSmtpServer+":"+config.MailSmtpPort, auth, from, []string{to}, []byte(mailTxt))
|
|
|
|
return err
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
}
|
|
|
|