X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fidentity.php;h=479896b9928032c53c3459197ed9eda68b7ac8f6;hb=11e62dd0fef499029744a33795aa7ac53e51c3b0;hp=f389ce44cfb25a120cbb53192dfc583468a0e36c;hpb=d4e46166df04792c6b939356ea5dfda8e47bba7b;p=squirrelmail.git diff --git a/functions/identity.php b/functions/identity.php index f389ce44..479896b9 100644 --- a/functions/identity.php +++ b/functions/identity.php @@ -5,7 +5,7 @@ * * This contains utility functions for dealing with multiple identities * - * @copyright © 1999-2009 The SquirrelMail Project Team + * @copyright 1999-2020 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package squirrelmail @@ -241,9 +241,9 @@ function build_from_header($identity = 0) { $from_mail .= '@' . $domain; if ( isset($from_name) ) { - $from_name_encoded = encodeHeader($from_name); + $from_name_encoded = encodeHeader('"' . $from_name . '"'); if ($from_name_encoded != $from_name) { - return '"' . $from_name_encoded . '" <' . $from_mail . '>'; + return $from_name_encoded . ' <' . $from_mail . '>'; } return '"' . $from_name . '" <' . $from_mail . '>'; }