Fix namespace email
This commit is contained in:
parent
97706124f5
commit
70418e92cd
|
@ -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) {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue