|
@@ 960-970 (lines=11) @@
|
| 957 |
|
$address = trim($address); |
| 958 |
|
$name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim |
| 959 |
|
$pos = strrpos($address, '@'); |
| 960 |
|
if (false === $pos) { |
| 961 |
|
// At-sign is missing. |
| 962 |
|
$error_message = $this->lang('invalid_address') . " (addAnAddress $kind): $address"; |
| 963 |
|
$this->setError($error_message); |
| 964 |
|
$this->edebug($error_message); |
| 965 |
|
if ($this->exceptions) { |
| 966 |
|
throw new Exception($error_message); |
| 967 |
|
} |
| 968 |
|
|
| 969 |
|
return false; |
| 970 |
|
} |
| 971 |
|
$params = [$kind, $address, $name]; |
| 972 |
|
// Enqueue addresses with IDN until we know the PHPMailer::$CharSet. |
| 973 |
|
if ($this->has8bitChars(substr($address, ++$pos)) and $this->idnSupported()) { |
|
@@ 1019-1028 (lines=10) @@
|
| 1016 |
|
|
| 1017 |
|
return false; |
| 1018 |
|
} |
| 1019 |
|
if (!static::validateAddress($address)) { |
| 1020 |
|
$error_message = $this->lang('invalid_address') . " (addAnAddress $kind): $address"; |
| 1021 |
|
$this->setError($error_message); |
| 1022 |
|
$this->edebug($error_message); |
| 1023 |
|
if ($this->exceptions) { |
| 1024 |
|
throw new Exception($error_message); |
| 1025 |
|
} |
| 1026 |
|
|
| 1027 |
|
return false; |
| 1028 |
|
} |
| 1029 |
|
if ('Reply-To' != $kind) { |
| 1030 |
|
if (!array_key_exists(strtolower($address), $this->all_recipients)) { |
| 1031 |
|
array_push($this->$kind, [$address, $name]); |