Fix Delist warning date on subject line of messages

This commit is contained in:
2025-03-17 14:53:59 +11:00
parent db34b2b641
commit bbc013a7a0
2 changed files with 6 additions and 4 deletions

View File

@@ -32,11 +32,12 @@ class NodeMarkedDown extends Netmails //implements ShouldQueue
{
$now = Carbon::now();
$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));
$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);
// 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 Files\r",number_format($this->ao->filesWaiting()->count())))
->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");
$o->msg = $msg->render();