Fix Delist warning date on subject line of messages
This commit is contained in:
parent
db34b2b641
commit
bbc013a7a0
@ -42,10 +42,11 @@ class NodeMarkedDown extends Notification //implements ShouldQueue
|
|||||||
Log::info(sprintf('%s:+ Sending a NODE MARKED DOWN EMAIL for address [%s]',self::LOGKEY,$this->ao->ftn));
|
Log::info(sprintf('%s:+ Sending a NODE MARKED DOWN EMAIL for address [%s]',self::LOGKEY,$this->ao->ftn));
|
||||||
|
|
||||||
$now = Carbon::now();
|
$now = Carbon::now();
|
||||||
|
$delist = $now->addDays(7);
|
||||||
|
|
||||||
return (new MailMessage)
|
return (new MailMessage)
|
||||||
->cc(our_address($this->ao)->system->users->first()->email)
|
->cc(our_address($this->ao)->system->users->first()->email)
|
||||||
->subject(sprintf('ACTION REQUIRED: Your system will be delisted on %s',$now->format('Y-m-d')))
|
->subject(sprintf('ACTION REQUIRED: Your system will be delisted on %s',$delist->format('Y-m-d')))
|
||||||
->line(sprintf('Your system has been marked **DOWN**, because it hasnt polled **%s** with address %s since **%s** (%d days).',
|
->line(sprintf('Your system has been marked **DOWN**, because it hasnt polled **%s** with address %s since **%s** (%d days).',
|
||||||
$this->ao->zone->domain->name,
|
$this->ao->zone->domain->name,
|
||||||
$this->ao->ftn4d,
|
$this->ao->ftn4d,
|
||||||
@ -57,7 +58,7 @@ class NodeMarkedDown extends Notification //implements ShouldQueue
|
|||||||
->line(sprintf('* %s Echomails',number_format($this->ao->echomailWaiting()->count())))
|
->line(sprintf('* %s Echomails',number_format($this->ao->echomailWaiting()->count())))
|
||||||
->line(sprintf('* %s Files',number_format($this->ao->filesWaiting()->count())))
|
->line(sprintf('* %s Files',number_format($this->ao->filesWaiting()->count())))
|
||||||
->line('')
|
->line('')
|
||||||
->line(sprintf('Your system will automatically be **DE-LISTED** if your system hasnt polled to collected your mail/file(s) by **%s**',$now->addDays(7)->format('Y-m-d')))
|
->line(sprintf('Your system will automatically be **DE-LISTED** if your system hasnt polled to collected your mail/file(s) by **%s**',$delist->format('Y-m-d')))
|
||||||
->line('If you think you\'ve received this email by mistake or need help, please let me know.');
|
->line('If you think you\'ve received this email by mistake or need help, please let me know.');
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -32,11 +32,12 @@ class NodeMarkedDown extends Netmails //implements ShouldQueue
|
|||||||
{
|
{
|
||||||
$now = Carbon::now();
|
$now = Carbon::now();
|
||||||
$ao = $notifiable->routeNotificationFor(static::via);
|
$ao = $notifiable->routeNotificationFor(static::via);
|
||||||
|
$delist = $now->addDays(7);
|
||||||
|
|
||||||
Log::info(sprintf('%s:+ Sending a NODE MARKED DOWN NETMAIL 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 = $this->setupNetmail($notifiable);
|
$o = $this->setupNetmail($notifiable);
|
||||||
$o->subject = sprintf('ACTION REQUIRED: Your system will be delisted on %s',$now->format('Y-m-d'));
|
$o->subject = sprintf('ACTION REQUIRED: Your system will be delisted on %s',$delist->format('Y-m-d'));
|
||||||
$o->flags = (Message::FLAG_LOCAL|Message::FLAG_PRIVATE|Message::FLAG_CRASH);
|
$o->flags = (Message::FLAG_LOCAL|Message::FLAG_PRIVATE|Message::FLAG_CRASH);
|
||||||
|
|
||||||
// Message
|
// Message
|
||||||
@ -50,7 +51,7 @@ class NodeMarkedDown extends Netmails //implements ShouldQueue
|
|||||||
->addText(sprintf("* %s Echomails\r",number_format($this->ao->echomailWaiting()->count())))
|
->addText(sprintf("* %s Echomails\r",number_format($this->ao->echomailWaiting()->count())))
|
||||||
->addText(sprintf("* %s Files\r",number_format($this->ao->filesWaiting()->count())))
|
->addText(sprintf("* %s Files\r",number_format($this->ao->filesWaiting()->count())))
|
||||||
->addText("\r")
|
->addText("\r")
|
||||||
->addText(sprintf("Your system will automatically be **DE-LISTED** if your system hasnt polled to collected your mail/file(s) by **%s**\r\r",$now->addDays(7)->format('Y-m-d')))
|
->addText(sprintf("Your system will automatically be **DE-LISTED** if your system hasnt polled to collected your mail/file(s) by **%s**\r\r",$delist->format('Y-m-d')))
|
||||||
->addText("If you think you've received this netmail by mistake or need help, please let me know.\r");
|
->addText("If you think you've received this netmail by mistake or need help, please let me know.\r");
|
||||||
|
|
||||||
$o->msg = $msg->render();
|
$o->msg = $msg->render();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user