Fix routed netmails being packed for the hub, not the destination. Added some logging for idle netmails/emails
This commit is contained in:
@@ -7,6 +7,7 @@ use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Notifications\Notification;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
use App\Models\Address;
|
||||
|
||||
@@ -14,6 +15,8 @@ class NodeDelisted extends Notification //implements ShouldQueue
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
private const LOGKEY = 'NED';
|
||||
|
||||
/**
|
||||
* Create a new notification instance.
|
||||
*/
|
||||
@@ -36,6 +39,8 @@ class NodeDelisted extends Notification //implements ShouldQueue
|
||||
*/
|
||||
public function toMail(object $notifiable): MailMessage
|
||||
{
|
||||
Log::info(sprintf('%s:+ Sending a NODE DELISTED EMAIL for address [%s]',self::LOGKEY,$this->ao->ftn));
|
||||
|
||||
$now = Carbon::now();
|
||||
|
||||
return (new MailMessage)
|
||||
|
@@ -7,6 +7,7 @@ use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Notifications\Notification;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
use App\Models\Address;
|
||||
|
||||
@@ -14,6 +15,8 @@ class NodeMarkedDown extends Notification //implements ShouldQueue
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
private const LOGKEY = 'NEM';
|
||||
|
||||
/**
|
||||
* Create a new notification instance.
|
||||
*/
|
||||
@@ -36,6 +39,8 @@ class NodeMarkedDown extends Notification //implements ShouldQueue
|
||||
*/
|
||||
public function toMail(object $notifiable): MailMessage
|
||||
{
|
||||
Log::info(sprintf('%s:+ Sending a NODE MARKED DOWN EMAIL for address [%s]',self::LOGKEY,$this->ao->ftn));
|
||||
|
||||
$now = Carbon::now();
|
||||
|
||||
return (new MailMessage)
|
||||
|
@@ -7,6 +7,7 @@ use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Notifications\Notification;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
use App\Models\Address;
|
||||
|
||||
@@ -14,6 +15,8 @@ class NodeMarkedHold extends Notification //implements ShouldQueue
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
private const LOGKEY = 'NEH';
|
||||
|
||||
/**
|
||||
* Create a new notification instance.
|
||||
*/
|
||||
@@ -36,6 +39,8 @@ class NodeMarkedHold extends Notification //implements ShouldQueue
|
||||
*/
|
||||
public function toMail(object $notifiable): MailMessage
|
||||
{
|
||||
Log::info(sprintf('%s:+ Sending a NODE MARKED HOLD EMAIL for address [%s]',self::LOGKEY,$this->ao->ftn));
|
||||
|
||||
$now = Carbon::now();
|
||||
|
||||
return (new MailMessage)
|
||||
|
@@ -4,7 +4,6 @@ namespace App\Notifications\Netmails;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
use App\Classes\FTN\Message;
|
||||
@@ -16,7 +15,7 @@ class NodeDelisted extends Netmails //implements ShouldQueue
|
||||
{
|
||||
use Queueable,PageTemplate;
|
||||
|
||||
private const LOGKEY = 'NMD';
|
||||
private const LOGKEY = 'NND';
|
||||
|
||||
/**
|
||||
* Create a new notification instance.
|
||||
|
@@ -4,7 +4,6 @@ namespace App\Notifications\Netmails;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
use App\Classes\FTN\Message;
|
||||
@@ -16,7 +15,7 @@ class NodeMarkedDown extends Netmails //implements ShouldQueue
|
||||
{
|
||||
use Queueable,PageTemplate;
|
||||
|
||||
private const LOGKEY = 'NMD';
|
||||
private const LOGKEY = 'NNM';
|
||||
|
||||
/**
|
||||
* Create a new notification instance.
|
||||
@@ -36,7 +35,7 @@ class NodeMarkedDown extends Netmails //implements ShouldQueue
|
||||
$o = $this->setupNetmail($notifiable);
|
||||
$ao = $notifiable->routeNotificationFor(static::via);
|
||||
|
||||
Log::info(sprintf('%s:+ Sending a NODE MARKED DOWN for address [%s]',self::LOGKEY,$ao->ftn));
|
||||
Log::info(sprintf('%s:+ Sending a NODE MARKED DOWN NETMAIL for address [%s]',self::LOGKEY,$ao->ftn));
|
||||
|
||||
$o->subject = sprintf('ACTION REQUIRED: Your system will be delisted on %s',$now->format('Y-m-d'));
|
||||
$o->flags = (Message::FLAG_LOCAL|Message::FLAG_PRIVATE|Message::FLAG_CRASH);
|
||||
|
@@ -4,7 +4,6 @@ namespace App\Notifications\Netmails;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
use App\Classes\FTN\Message;
|
||||
@@ -16,7 +15,7 @@ class NodeMarkedHold extends Netmails //implements ShouldQueue
|
||||
{
|
||||
use Queueable,PageTemplate;
|
||||
|
||||
private const LOGKEY = 'NMD';
|
||||
private const LOGKEY = 'NNH';
|
||||
|
||||
/**
|
||||
* Create a new notification instance.
|
||||
|
Reference in New Issue
Block a user