Skip to content

Commit

Permalink
Update smtp_send.go
Browse files Browse the repository at this point in the history
  • Loading branch information
souramoo authored Jul 27, 2021
1 parent 236456e commit 432309b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions api/smtp_send.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,11 @@ func smtpSendMail(toAddress string, toName string, contentType string, subject s
return err
}

err = c.Auth(smtpAuth)
if err != nil {
return err
if smtpAuth != nil {
err = c.Auth(smtpAuth)
if err != nil {
return err
}
}

err = c.Mail(from.Address)
Expand Down

0 comments on commit 432309b

Please sign in to comment.