diff --git a/cmd/bs1in/config.go b/cmd/bs1in/config.go index 530e1e2..e463cf7 100644 --- a/cmd/bs1in/config.go +++ b/cmd/bs1in/config.go @@ -21,6 +21,7 @@ type Config struct { MariaDbPort string `json:"mariadb_port"` MailUser string `json:"mail_user"` MailPass string `json:"mail_pass"` + MailSmtpUser string `json:"mail_smtp_user"` MailSmtpServer string `json:"mail_smtp_server"` MailSmtpPort string `json:"mail_smtp_port"` UserCreationSecret string `json:"user_creation_secret"` diff --git a/cmd/bs1in/mail.go b/cmd/bs1in/mail.go index 7b0b410..3ded51e 100644 --- a/cmd/bs1in/mail.go +++ b/cmd/bs1in/mail.go @@ -16,7 +16,7 @@ Content-Type: text/plain; charset="UTF-8" ` header = fmt.Sprintf(header, from, to, subject) 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)) return err }