Emails/notifications not sending #675 (#686)

* Add test call to test notification #675

* Fix queue driver with emails not sending; formatting #675
This commit is contained in:
Nabeel S
2020-05-09 11:31:25 -04:00
committed by GitHub
parent 69fb5a537e
commit 1054d53826
14 changed files with 37 additions and 10 deletions

View File

@@ -20,7 +20,7 @@ class BaseNotification extends Notification implements ShouldQueue
$klass = get_class($this);
$notif_config = config('notifications.channels', []);
if (!array_key_exists($klass, $notif_config)) {
Log::error('Notification type '.$klass.' missing from notifications config');
Log::error('Notification type '.$klass.' missing from notifications config, defaulting to mail');
return;
}

View File

@@ -6,9 +6,9 @@ use Illuminate\Notifications\Messages\MailMessage;
trait MailChannel
{
private $mailSubject;
private $mailTemplate;
private $mailTemplateArgs;
protected $mailSubject;
protected $mailTemplate;
protected $mailTemplateArgs;
/**
* Set the arguments for the toMail() method

View File

@@ -10,6 +10,8 @@ class AdminUserRegistered extends BaseNotification
{
use MailChannel;
public $channels = ['mail'];
private $user;
/**

View File

@@ -10,6 +10,8 @@ class NewsAdded extends BaseNotification
{
use MailChannel;
public $channels = ['mail'];
private $news;
public function __construct(News $news)

View File

@@ -13,6 +13,8 @@ class PirepAccepted extends BaseNotification
{
use MailChannel;
public $channels = ['mail'];
private $pirep;
/**

View File

@@ -10,6 +10,8 @@ class PirepRejected extends BaseNotification
{
use MailChannel;
public $channels = ['mail'];
private $pirep;
/**

View File

@@ -10,6 +10,8 @@ class PirepSubmitted extends BaseNotification
{
use MailChannel;
public $channels = ['mail'];
private $pirep;
/**

View File

@@ -10,6 +10,8 @@ class UserPending extends BaseNotification
{
use MailChannel;
public $channels = ['mail'];
private $user;
/**
@@ -17,6 +19,8 @@ class UserPending extends BaseNotification
*/
public function __construct(User $user)
{
parent::__construct();
$this->user = $user;
$this->setMailable(

View File

@@ -10,6 +10,8 @@ class UserRegistered extends BaseNotification
{
use MailChannel;
public $channels = ['mail'];
private $user;
/**

View File

@@ -10,6 +10,8 @@ class UserRejected extends BaseNotification
{
use MailChannel;
public $channels = ['mail'];
private $user;
/**