Skip to content

Commit

Permalink
Check error returned from dialer in EmailBee
Browse files Browse the repository at this point in the history
  • Loading branch information
muesli committed Jul 13, 2019
1 parent 5e1ccac commit f666b53
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bees/emailbee/emailbee.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ func (mod *EmailBee) Action(action bees.Action) []bees.Placeholder {
portstr = "587"
}
port, _ := strconv.Atoi(portstr)
s, _ := mail.NewDialer(host, port, mod.username, mod.password).Dial()
s, err := mail.NewDialer(host, port, mod.username, mod.password).Dial()
if err != nil {
panic(err)
}

// Send the email.
if err := mail.Send(s, m); err != nil {
Expand Down

0 comments on commit f666b53

Please sign in to comment.