[-] Classes : #PSCFI-4931 : BugFix Better encoding for accentuated chars in mails headers

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14063 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
fGaillard
2012-03-13 09:48:04 +00:00
parent fc53c0a5f8
commit af51a585a1
+3 -2
View File
@@ -117,14 +117,15 @@ class MailCore
if ($toName && is_array($toName) && Validate::isGenericName($toName[$key])) if ($toName && is_array($toName) && Validate::isGenericName($toName[$key]))
$to_name = $toName[$key]; $to_name = $toName[$key];
} }
$to_list->addTo($addr, base64_encode($to_name)); /* Encode accentuated chars */
$to_list->addTo($addr, '=?UTF-8?B?'.base64_encode($to_name).'?=');
} }
$to_plugin = $to[0]; $to_plugin = $to[0];
$to = $to_list; $to = $to_list;
} else { } else {
/* Simple recipient, one address */ /* Simple recipient, one address */
$to_plugin = $to; $to_plugin = $to;
$to = new Swift_Address($to, base64_encode($toName)); $to = new Swift_Address($to, '=?UTF-8?B?'.base64_encode($toName).'?=');
} }
try { try {
/* Connect with the appropriate configuration */ /* Connect with the appropriate configuration */