From 0bdab5ae06e9d9ddcc3fcc8c79b76d34d160c65c Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Mon, 12 Jun 2023 23:37:39 +0300 Subject: [PATCH] contact/display-name: quote "names" with '@' Apparently, some mail servers want this, and gnus doesn't handle it automatically. --- lib/message/mu-contact.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/message/mu-contact.cc b/lib/message/mu-contact.cc index acf912307..4ce9a5c9b 100644 --- a/lib/message/mu-contact.cc +++ b/lib/message/mu-contact.cc @@ -1,5 +1,5 @@ /* -** Copyright (C) 2022 Dirk-Jan C. Binnema +** Copyright (C) 2022-2023 Dirk-Jan C. Binnema ** ** This program is free software; you can redistribute it and/or modify it ** under the terms of the GNU General Public License as published by the @@ -32,9 +32,9 @@ using namespace Mu; std::string Contact::display_name() const { - auto needs_quoting= [](const std::string& n) { + const auto needs_quoting= [](const std::string& n) { for (auto& c: n) - if (c == ',' || c == '"') + if (c == ',' || c == '"' || c == '@') return true; return false; };