[-] BO : Check if function mb_encode_mimeheader exist in case some user uninstall it
This commit is contained in:
+8
-2
@@ -147,7 +147,10 @@ class MailCore
|
|||||||
if ($to_name == null)
|
if ($to_name == null)
|
||||||
$to_name = $addr;
|
$to_name = $addr;
|
||||||
/* Encode accentuated chars */
|
/* Encode accentuated chars */
|
||||||
$to_list->addTo($addr, mb_encode_mimeheader($to_name, 'utf-8'));
|
if (function_exists('mb_encode_mimeheader'))
|
||||||
|
$to_list->addTo($addr, mb_encode_mimeheader($to_name, 'utf-8'));
|
||||||
|
else
|
||||||
|
$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;
|
||||||
@@ -156,7 +159,10 @@ class MailCore
|
|||||||
$to_plugin = $to;
|
$to_plugin = $to;
|
||||||
if ($to_name == null)
|
if ($to_name == null)
|
||||||
$to_name = $to;
|
$to_name = $to;
|
||||||
$to = new Swift_Address($to, mb_encode_mimeheader($to_name, 'utf-8'));
|
if (function_exists('mb_encode_mimeheader'))
|
||||||
|
$to = new Swift_Address($to, mb_encode_mimeheader($to_name, 'utf-8'));
|
||||||
|
else
|
||||||
|
$to = new Swift_Address($to, '=?UTF-8?B?'.base64_encode($to_name).'?=');
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
/* Connect with the appropriate configuration */
|
/* Connect with the appropriate configuration */
|
||||||
|
|||||||
Reference in New Issue
Block a user