php7를 위한 phpmailer 수정 (추후 phpmailer 업데이트를 하면 좋겠음)

This commit is contained in:
conory 2015-12-21 16:17:31 +09:00
parent 09c2e0ea71
commit e0402e1019

View file

@ -1724,10 +1724,10 @@ class PHPMailer {
switch (strtolower($position)) {
case 'phrase':
$encoded = preg_replace("/([^A-Za-z0-9!*+\/ -])/e", "'='.sprintf('%02X', ord('\\1'))", $encoded);
$encoded = preg_replace_callback('/([^A-Za-z0-9!*+\/ -])/', function($n) { return '='.sprintf('%02X', ord('\\1')); }, $encoded);
break;
case 'comment':
$encoded = preg_replace("/([\(\)\"])/e", "'='.sprintf('%02X', ord('\\1'))", $encoded);
$encoded = preg_replace_callback('/([\(\)\"])/', function($n) { return '='.sprintf('%02X', ord('\\1')); }, $encoded);
case 'text':
default:
// Replace every high ascii, control =, ? and _ characters