Check for mbstring before trying to use it in parseAddresses
This commit is contained in:
parent
c626b9e165
commit
6b6badad3f
|
|
@ -1,5 +1,8 @@
|
|||
# PHPMailer Change Log
|
||||
|
||||
## WIP
|
||||
* Check for mbstring extension before decoding addresss in `parseAddress`
|
||||
|
||||
## Version 6.3.0 (February 19th, 2021)
|
||||
* Handle early connection errors such as 421 during connection and EHLO states
|
||||
* Switch to Github Actions for CI
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
"yoast/phpunit-polyfills": "^0.2.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-mbstring": "Needed to send email in multibyte encoding charset",
|
||||
"ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses",
|
||||
"hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication",
|
||||
"league/oauth2-google": "Needed for Google XOAUTH2 authentication",
|
||||
"psr/log": "For optional PSR-3 debug logging",
|
||||
|
|
|
|||
|
|
@ -1199,7 +1199,7 @@ class PHPMailer
|
|||
)
|
||||
) {
|
||||
//Decode the name part if it's present and encoded
|
||||
if (property_exists($address, 'personal') && preg_match('/^=\?.*\?=$/', $address->personal)) {
|
||||
if (extension_loaded('mbstring') && property_exists($address, 'personal') && preg_match('/^=\?.*\?=$/', $address->personal)) {
|
||||
$address->personal = mb_decode_mimeheader($address->personal);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue