Update class.phpmailer.php (#5431)

This commit is contained in:
phoneben 2020-08-31 05:19:37 +03:00 committed by GitHub
parent f7b715b399
commit 00b96b41b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 10 deletions

View File

@ -56,7 +56,7 @@ class PHPMailer {
* Sets the CharSet of the message.
* @var string
*/
public $CharSet = 'iso-8859-1';
public $CharSet = 'UTF-8';
/**
* Sets the Content-type of the message.
@ -69,7 +69,7 @@ class PHPMailer {
* "8bit", "7bit", "binary", "base64", and "quoted-printable".
* @var string
*/
public $Encoding = '8bit';
public $Encoding = 'base64';
/**
* Holds the most recent mailer error message.
@ -171,7 +171,7 @@ class PHPMailer {
* @var boolean
*/
public $UseSendmailOptions = true;
/**
* Path to PHPMailer plugins. Useful if the SMTP class
* is in a different directory than the PHP include path.
@ -264,7 +264,7 @@ class PHPMailer {
* @var string
*/
public $AuthType = '';
/**
* Sets SMTP realm.
* @var string
@ -491,7 +491,7 @@ class PHPMailer {
const STOP_CONTINUE = 1; // message?, likely ok to continue processing
const STOP_CRITICAL = 2; // message, plus full stop, critical error reached
const CRLF = "\r\n"; // SMTP RFC specified EOL
/////////////////////////////////////////////////
// METHODS, VARIABLES
/////////////////////////////////////////////////
@ -1849,7 +1849,7 @@ class PHPMailer {
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
set_magic_quotes_runtime(0);
} else {
ini_set('magic_quotes_runtime', 0);
ini_set('magic_quotes_runtime', 0);
}
}
$file_buffer = file_get_contents($path);
@ -1858,7 +1858,7 @@ class PHPMailer {
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
set_magic_quotes_runtime($magic_quotes);
} else {
ini_set('magic_quotes_runtime', $magic_quotes);
ini_set('magic_quotes_runtime', $magic_quotes);
}
}
return $file_buffer;
@ -2135,13 +2135,13 @@ class PHPMailer {
$pattern = '\075\000-\011\013\014\016-\037\077\137\177-\377' . $pattern;
break;
}
if (preg_match_all("/[{$pattern}]/", $encoded, $matches)) {
foreach (array_unique($matches[0]) as $char) {
$encoded = str_replace($char, '=' . sprintf('%02X', ord($char)), $encoded);
}
}
//Replace every spaces to _ (more readable than =20)
return str_replace(' ', '_', $encoded);
}
@ -2814,4 +2814,4 @@ class phpmailerException extends Exception {
return $errorMsg;
}
}
?>
?>