From 07c19aea6d4e0e082f31a772d5faebc3aca149af Mon Sep 17 00:00:00 2001 From: j3s Date: Thu, 2 Jan 2020 21:05:08 -0600 Subject: [PATCH] Make config generic --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 96bc047..95ba748 100644 --- a/main.go +++ b/main.go @@ -353,8 +353,8 @@ func send(e *parsemail.Email) { 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()) } -- 2.51.2