Fix namespace email
This commit is contained in:
parent
97706124f5
commit
70418e92cd
|
@ -5,6 +5,7 @@ namespace Modules\Emails;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use Hooks\Manager;
|
use Hooks\Manager;
|
||||||
use Notifications\EmailNotification;
|
use Notifications\EmailNotification;
|
||||||
|
use PHPMailer\PHPMailer\Exception;
|
||||||
|
|
||||||
class EmailHook extends Manager
|
class EmailHook extends Manager
|
||||||
{
|
{
|
||||||
|
@ -72,7 +73,7 @@ class EmailHook extends Manager
|
||||||
try {
|
try {
|
||||||
// Invio mail
|
// Invio mail
|
||||||
$email->send();
|
$email->send();
|
||||||
} catch (PHPMailer\PHPMailer\Exception $e) {
|
} catch (Exception $e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,8 @@ namespace Notifications;
|
||||||
|
|
||||||
use Modules\Emails\Account;
|
use Modules\Emails\Account;
|
||||||
use PHPMailer\PHPMailer\PHPMailer;
|
use PHPMailer\PHPMailer\PHPMailer;
|
||||||
|
use PHPMailer\PHPMailer\Exception;
|
||||||
|
use Modules\Emails\Mail;
|
||||||
use Prints;
|
use Prints;
|
||||||
use Uploads;
|
use Uploads;
|
||||||
|
|
||||||
|
@ -71,7 +73,7 @@ class EmailNotification extends PHPMailer implements NotificationInterface
|
||||||
$this->WordWrap = 78;
|
$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);
|
$result = new self($mail->account->id, $exceptions);
|
||||||
|
|
||||||
|
@ -146,7 +148,7 @@ class EmailNotification extends PHPMailer implements NotificationInterface
|
||||||
$exception = null;
|
$exception = null;
|
||||||
try {
|
try {
|
||||||
$result = parent::send();
|
$result = parent::send();
|
||||||
} catch (PHPMailer\PHPMailer\Exception $e) {
|
} catch (Exception $e) {
|
||||||
$result = false;
|
$result = false;
|
||||||
$exception = $e;
|
$exception = $e;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue