Add AKA to email notification
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 38s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m50s
Create Docker Image / Final Docker Image Manifest (push) Successful in 9s

This commit is contained in:
Deon George 2024-06-30 11:25:04 +10:00
parent 4d7af7c7e3
commit 617901f7df
3 changed files with 15 additions and 3 deletions

View File

@ -46,7 +46,11 @@ class NodeDelisted extends Notification //implements ShouldQueue
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('Your system has been DE-LISTED on %s from %s',$now->format('Y-m-d'),$x=$this->ao->zone->domain->name)) ->subject(sprintf('Your system has been DE-LISTED on %s from %s',$now->format('Y-m-d'),$x=$this->ao->zone->domain->name))
->line(sprintf('Your system has been DE-LISTED, because it hasnt polled **%s** since **%s** (%d days).',$x,$this->ao->system->last_session->format('Y-m-d'),$this->ao->system->last_session->diffInDays($now))) ->line(sprintf('Your system has been DE-LISTED, because it hasnt polled **%s** with address %s since **%s** (%d days).',
$x,
$this->ao->ftn4d,
$this->ao->system->last_session->format('Y-m-d'),
$this->ao->system->last_session->diffInDays($now)))
->line('') ->line('')
->line('If you think this was a mistake, please let me know.') ->line('If you think this was a mistake, please let me know.')
->line(sprintf('If you think about returning to %s, then reach out and we can get you back online pretty quickly.',$x)); ->line(sprintf('If you think about returning to %s, then reach out and we can get you back online pretty quickly.',$x));

View File

@ -46,7 +46,11 @@ class NodeMarkedDown extends Notification //implements ShouldQueue
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',$now->format('Y-m-d')))
->line(sprintf('Your system has been marked **DOWN**, because it hasnt polled **%s** since **%s** (%d days).',$this->ao->zone->domain->name,$this->ao->system->last_session->format('Y-m-d'),$this->ao->system->last_session->diffInDays($now))) ->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->ftn4d,
$this->ao->system->last_session->format('Y-m-d'),
$this->ao->system->last_session->diffInDays($now)))
->line('') ->line('')
->line('You have (waiting for collection):') ->line('You have (waiting for collection):')
->lineIf($this->ao->uncollected_netmail,sprintf('* %s Netmails',number_format($this->ao->uncollected_netmail))) ->lineIf($this->ao->uncollected_netmail,sprintf('* %s Netmails',number_format($this->ao->uncollected_netmail)))

View File

@ -46,7 +46,11 @@ class NodeMarkedHold extends Notification //implements ShouldQueue
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('Your system has been marked HOLD') ->subject('Your system has been marked HOLD')
->line(sprintf('Your system has been marked **HOLD**, because it hasnt polled **%s** since **%s** (%d days).',$this->ao->zone->domain->name,$this->ao->system->last_session->format('Y-m-d'),$this->ao->system->last_session->diffInDays($now))) ->line(sprintf('Your system has been marked **HOLD**, because it hasnt polled **%s** with address %s since **%s** (%d days).',
$this->ao->zone->domain->name,
$this->ao->ftn4d,
$this->ao->system->last_session->format('Y-m-d'),
$this->ao->system->last_session->diffInDays($now)))
->line('') ->line('')
->line('You have (waiting for collection):') ->line('You have (waiting for collection):')
->lineIf($this->ao->uncollected_netmail,sprintf('* %s Netmails',number_format($this->ao->uncollected_netmail))) ->lineIf($this->ao->uncollected_netmail,sprintf('* %s Netmails',number_format($this->ao->uncollected_netmail)))