diff --git a/courier/smtp_channel.go b/courier/smtp_channel.go index 9ed9335f8e7f..15a685bcd7ad 100644 --- a/courier/smtp_channel.go +++ b/courier/smtp_channel.go @@ -107,8 +107,8 @@ func (c *SMTPChannel) Dispatch(ctx context.Context, msg Message) error { gm.AddAlternative("text/html", htmlBody) } - if err := c.smtpClient.DialAndSend(ctx, gm); err != nil { - c.d.Logger(). + if err := errors.WithStack(c.smtpClient.DialAndSend(ctx, gm)); err != nil { + logger. WithError(err). Error("Unable to send email using SMTP connection.")