mirror of
https://github.com/nikoksr/notify.git
synced 2025-01-20 02:59:56 +02:00
refactor: split error checking to separate line
This commit is contained in:
parent
a1d960c266
commit
24bfbed1e2
@ -42,7 +42,8 @@ func (m *Mailgun) AddReceivers(addresses ...string) {
|
||||
func (m Mailgun) Send(subject, message string) error {
|
||||
mailMessage := m.client.NewMessage(m.senderAddress, subject, message, m.receiverAddresses...)
|
||||
|
||||
if _, _, err := m.client.Send(context.Background(), mailMessage); err != nil {
|
||||
_, _, err := m.client.Send(context.Background(), mailMessage)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to send mail using Mailgun service")
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user