From 094d46293e63bb77b51ca70079f669cf6752b6d0 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Thu, 5 Sep 2019 05:29:21 +0300 Subject: [PATCH] Set Smtp.error when SMTP fails to send message --- src/smtp.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/smtp.rs b/src/smtp.rs index a9c7cf211..a1dc96789 100644 --- a/src/smtp.rs +++ b/src/smtp.rs @@ -152,6 +152,7 @@ impl Smtp { } Err(err) => { warn!(context, 0, "SMTP failed to send message: {}", err); + self.error = Some(format!("{}", err)); 0 } }