|
@@ -451,7 +451,8 @@ class PHPMailer {
|
|
|
*/
|
|
|
private function AddAnAddress($kind, $address, $name = '') {
|
|
|
if (!preg_match('/^(to|cc|bcc|ReplyTo)$/', $kind)) {
|
|
|
- echo 'Invalid recipient array: ' . kind;
|
|
|
+
|
|
|
+ $this->SetError('Invalid recipient array: ' . $kind);
|
|
|
return false;
|
|
|
}
|
|
|
$address = trim($address);
|
|
@@ -461,7 +462,6 @@ class PHPMailer {
|
|
|
if ($this->exceptions) {
|
|
|
throw new phpmailerException($this->Lang('invalid_address').': '.$address);
|
|
|
}
|
|
|
- echo $this->Lang('invalid_address').': '.$address;
|
|
|
return false;
|
|
|
}
|
|
|
if ($kind != 'ReplyTo') {
|
|
@@ -493,7 +493,6 @@ class PHPMailer {
|
|
|
if ($this->exceptions) {
|
|
|
throw new phpmailerException($this->Lang('invalid_address').': '.$address);
|
|
|
}
|
|
|
- echo $this->Lang('invalid_address').': '.$address;
|
|
|
return false;
|
|
|
}
|
|
|
$this->From = $address;
|
|
@@ -583,7 +582,6 @@ class PHPMailer {
|
|
|
if ($this->exceptions) {
|
|
|
throw $e;
|
|
|
}
|
|
|
- echo $e->getMessage()."\n";
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
@@ -1367,7 +1365,6 @@ class PHPMailer {
|
|
|
if ($this->exceptions) {
|
|
|
throw $e;
|
|
|
}
|
|
|
- echo $e->getMessage()."\n";
|
|
|
if ( $e->getCode() == self::STOP_CRITICAL ) {
|
|
|
return false;
|
|
|
}
|