mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Update class.phpmailer.php update for PHP 8.1
This commit is contained in:
@@ -870,6 +870,8 @@ class PHPMailer
|
||||
*/
|
||||
protected function addOrEnqueueAnAddress($kind, $address, $name)
|
||||
{
|
||||
if (empty($address)) { $address = ''; }
|
||||
if (empty($name)) { $name = ''; }
|
||||
$address = trim($address);
|
||||
$name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
|
||||
if (($pos = strrpos($address, '@')) === false) {
|
||||
@@ -1010,8 +1012,10 @@ class PHPMailer
|
||||
* @throws phpmailerException
|
||||
* @return boolean
|
||||
*/
|
||||
public function setFrom($address, $name = '', $auto = true)
|
||||
public function setFrom($address, $name, $auto = true)
|
||||
{
|
||||
if (empty($address)) { $address = ''; }
|
||||
if (empty($name)) { $name = ''; }
|
||||
$address = trim($address);
|
||||
$name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
|
||||
// Don't validate now addresses with IDN. Will be done in send().
|
||||
|
||||
Reference in New Issue
Block a user