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