short error return syntax

This commit is contained in:
Willy Kloucek
2022-07-25 16:37:30 +02:00
parent 863ddda4bb
commit 7365d6cb13

View File

@@ -70,17 +70,11 @@ func (m Mail) SendMessage(userIDs []string, msg string) error {
email := mail.NewMSG()
email.SetFrom(m.conf.Notifications.SMTP.Sender).
AddTo(to...)
email.SetFrom(m.conf.Notifications.SMTP.Sender).AddTo(to...)
email.SetBody(mail.TextPlain, msg)
err = email.Send(smtpClient)
if err != nil {
return err
}
return nil
return email.Send(smtpClient)
}
// SendMessageToGroup sends a message to all members of the given group.