Make config generic
j3s j3s@c3f.net
Thu, 02 Jan 2020 21:05:08 -0600
1 files changed,
2 insertions(+),
2 deletions(-)
jump to
M
main.go
→
main.go
@@ -353,8 +353,8 @@ for _, a := range e.Bcc {
recipients = append(recipients, a.Address) } - auth := smtp.PlainAuth("", gConfig.SMTPUsername, gConfig.SMTPPassword, "mail.c3f.net") - err := smtp.SendMail("mail.c3f.net:587", auth, e.Header.Get("Sender"), recipients, e.ToBytes()) + auth := smtp.PlainAuth("", gConfig.SMTPUsername, gConfig.SMTPPassword, gConfig.SMTPHostname) + err := smtp.SendMail(gConfig.SMTPHostname + ":" + gConfig.SMTPPort, auth, e.Header.Get("Sender"), recipients, e.ToBytes()) if err != nil { log.Printf("ERROR_SENDING_MAIL: Error=%q\n", err.Error()) }