diff --git a/mail/mail.go b/mail/mail.go index 08e23d8..a9804c1 100644 --- a/mail/mail.go +++ b/mail/mail.go @@ -106,6 +106,9 @@ func (sender *Sender) Init(senderSettings map[string]string, logger *logging.Log sender.Username = sender.From } // test settings + if sender.From == "" { + return fmt.Errorf("mail_from can't be empty") + } t, err := smtp.Dial(fmt.Sprintf("%s:%d", sender.SMTPhost, sender.SMTPport)) if err != nil { return err