Улучшил обработку ошибок

This commit is contained in:
Фёдор Подлеснов 2016-07-28 11:19:47 +03:00
parent b84e13f769
commit 3ebc007b8d
3 changed files with 11 additions and 5 deletions

View file

@ -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;
}