X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=functions%2Fidentity.php;h=0badef09ab7e9d1738e9a5a752d50c3db2f07d0a;hp=83763dfa3d9c3702d6ab0e4e31417befe848a609;hb=d84568cfd14ad57146c48a6af9ba0aa25e1790b5;hpb=1f98d935d39c2e407717e0fd8a641926ee3dd2e6 diff --git a/functions/identity.php b/functions/identity.php index 83763dfa..0badef09 100644 --- a/functions/identity.php +++ b/functions/identity.php @@ -5,7 +5,7 @@ * * This contains utility functions for dealing with multiple identities * - * @copyright © 1999-2007 The SquirrelMail Project Team + * @copyright 1999-2016 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 . '>'; }