Улучшил обработку ошибок
This commit is contained in:
parent
b84e13f769
commit
3ebc007b8d
3 changed files with 11 additions and 5 deletions
|
|
@ -193,10 +193,10 @@ class Mail
|
|||
function send()
|
||||
{
|
||||
$result = mail($this->to, $this->getSubject(), $this->getMessage(), $this->getHeader());
|
||||
// $result = false;
|
||||
if(! $result) {
|
||||
require_once "core/path.php";
|
||||
file_put_contents(Path::resolveFile("data/email/send.eml"), $this->eml());
|
||||
throw new Exception('Невозможно отправить почту');
|
||||
// require_once "core/path.php";
|
||||
// file_put_contents(Path::resolveFile("data/email/send.eml"), $this->eml());
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue