Fix namespace email

This commit is contained in:
Matteo Baccarin 2019-12-27 15:56:20 +01:00
parent 97706124f5
commit 70418e92cd
2 changed files with 6 additions and 3 deletions

View File

@ -5,6 +5,7 @@ namespace Modules\Emails;
use Carbon\Carbon;
use Hooks\Manager;
use Notifications\EmailNotification;
use PHPMailer\PHPMailer\Exception;
class EmailHook extends Manager
{
@ -72,7 +73,7 @@ class EmailHook extends Manager
try {
// Invio mail
$email->send();
} catch (PHPMailer\PHPMailer\Exception $e) {
} catch (Exception $e) {
}
}

View File

@ -4,6 +4,8 @@ namespace Notifications;
use Modules\Emails\Account;
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
use Modules\Emails\Mail;
use Prints;
use Uploads;
@ -71,7 +73,7 @@ class EmailNotification extends PHPMailer implements NotificationInterface
$this->WordWrap = 78;
}
public static function build(\Modules\Emails\Mail $mail, $exceptions = null)
public static function build(Mail $mail, $exceptions = null)
{
$result = new self($mail->account->id, $exceptions);
@ -146,7 +148,7 @@ class EmailNotification extends PHPMailer implements NotificationInterface
$exception = null;
try {
$result = parent::send();
} catch (PHPMailer\PHPMailer\Exception $e) {
} catch (Exception $e) {
$result = false;
$exception = $e;
}