mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 20:58:30 +01:00
Prevent direct page output
This commit is contained in:
parent
ee1af5e9cd
commit
bed78df539
@ -8,10 +8,8 @@
|
||||
*
|
||||
* e107 Main
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_handlers/mail.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $URL$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -251,7 +249,7 @@ class e107Email extends PHPMailer
|
||||
$this->Port = 465;
|
||||
break;
|
||||
default :
|
||||
echo "Invalid option: {$smtp_options['secure']}<br />";
|
||||
if (defined('MAIL_DEBUG')) echo "Invalid option: {$smtp_options['secure']}<br />";
|
||||
}
|
||||
}
|
||||
$this->SMTPKeepAlive = varset($smtp_options['keepalive'],FALSE); // ***** Control this
|
||||
@ -757,7 +755,7 @@ class e107Email extends PHPMailer
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Add embedded image {$url} failed<br />";
|
||||
if (defined('MAIL_DEBUG')) echo "Add embedded image {$url} failed<br />";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -405,7 +405,7 @@ class PHPMailer {
|
||||
*/
|
||||
private function AddAnAddress($kind, $address, $name = '') {
|
||||
if (!preg_match('/^(to|cc|bcc|ReplyTo)$/', $kind)) {
|
||||
echo 'Invalid recipient array: ' . kind;
|
||||
if (defined('MAIL_DEBUG')) echo 'Invalid recipient array: ' . kind;
|
||||
return false;
|
||||
}
|
||||
$address = trim($address);
|
||||
@ -415,7 +415,7 @@ class PHPMailer {
|
||||
if ($this->exceptions) {
|
||||
throw new phpmailerException($this->Lang('invalid_address').': '.$address);
|
||||
}
|
||||
echo $this->Lang('invalid_address').': '.$address;
|
||||
if (defined('MAIL_DEBUG')) echo $this->Lang('invalid_address').': '.$address;
|
||||
return false;
|
||||
}
|
||||
if ($kind != 'ReplyTo') {
|
||||
@ -447,7 +447,7 @@ class PHPMailer {
|
||||
if ($this->exceptions) {
|
||||
throw new phpmailerException($this->Lang('invalid_address').': '.$address);
|
||||
}
|
||||
echo $this->Lang('invalid_address').': '.$address;
|
||||
if (defined('MAIL_DEBUG')) echo $this->Lang('invalid_address').': '.$address;
|
||||
return false;
|
||||
}
|
||||
$this->From = $address;
|
||||
@ -524,7 +524,7 @@ class PHPMailer {
|
||||
if ($this->exceptions) {
|
||||
throw $e;
|
||||
}
|
||||
echo $e->getMessage()."\n";
|
||||
if (defined('MAIL_DEBUG')) echo $e->getMessage()."\n";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -1246,7 +1246,7 @@ class PHPMailer {
|
||||
if ($this->exceptions) {
|
||||
throw $e;
|
||||
}
|
||||
echo $e->getMessage()."\n";
|
||||
if (defined('MAIL_DEBUG')) echo $e->getMessage()."\n";
|
||||
if ( $e->getCode() == self::STOP_CRITICAL ) {
|
||||
return false;
|
||||
}
|
||||
@ -2067,7 +2067,9 @@ class PHPMailer {
|
||||
class phpmailerException extends Exception {
|
||||
public function errorMessage() {
|
||||
$errorMsg = '<strong>' . $this->getMessage() . "</strong><br />\n";
|
||||
return $errorMsg;
|
||||
|
||||
if (defined('MAIL_DEBUG')) return $errorMsg;
|
||||
return '';
|
||||
}
|
||||
}
|
||||
?>
|
Loading…
x
Reference in New Issue
Block a user