From ff33044e3b5e1b2f103331363bec15cebb66dd9c Mon Sep 17 00:00:00 2001 From: Hocuri Date: Tue, 5 Aug 2025 15:43:58 +0200 Subject: [PATCH] fix: Make "end-to-end encryption not setup" message work again Reported by adbenitez in the release coordination group: The "end-to-end encryption not setup" message didn't appear anymore when trying to send an unencrypted message with a chatmail account. This was because on the server side, the casing of the error message changed ("Inalid unencrypted mail" -> "Invalid Unencrypted mail"). This PR ignores the casing. --- src/smtp.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/smtp.rs b/src/smtp.rs index 405f4f5e0..b272416da 100644 --- a/src/smtp.rs +++ b/src/smtp.rs @@ -414,7 +414,10 @@ pub(crate) async fn send_msg_to_smtp( .await?; } SendResult::Failure(ref err) => { - if err.to_string().contains("Invalid unencrypted mail") { + if err + .to_string() + .to_lowercase() + .contains("invalid unencrypted mail") { let res = context .sql .query_row_optional(