diff --git a/services/notifications/pkg/channels/channels.go b/services/notifications/pkg/channels/channels.go index 9a83dcfb3c3..896dc8afcff 100644 --- a/services/notifications/pkg/channels/channels.go +++ b/services/notifications/pkg/channels/channels.go @@ -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.