From d41764bfd6b22417ac5ff4993c4f8961e20f58c6 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 15 Mar 2024 18:51:17 +0000 Subject: Fix sending emails to nicks ending with a backslash. --- src/mail.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mail.cpp b/src/mail.cpp index 68f51c556..03b1be318 100644 --- a/src/mail.cpp +++ b/src/mail.cpp @@ -48,7 +48,7 @@ void Mail::Message::Run() if (this->dont_quote_addresses) fprintf(pipe, "To: %s <%s>\r\n", mail_to.c_str(), addr.c_str()); else - fprintf(pipe, "To: \"%s\" <%s>\r\n", mail_to.c_str(), addr.c_str()); + fprintf(pipe, "To: \"%s\" <%s>\r\n", mail_to.replace_all_cs("\\", "\\\\").c_str(), addr.c_str()); fprintf(pipe, "Subject: %s\r\n", subject.c_str()); fprintf(pipe, "Content-Type: %s\r\n", content_type.c_str()); fprintf(pipe, "Content-Transfer-Encoding: 8bit\r\n"); -- cgit