Skip to content
This repository has been archived by the owner on Jun 21, 2018. It is now read-only.

Commit

Permalink
mail_from value required for mail sender
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexAkulov committed May 4, 2016
1 parent 9baf18b commit 0b65484
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mail/mail.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0b65484

Please sign in to comment.