mirror of
https://github.com/anonaddy/anonaddy.git
synced 2025-12-28 07:55:07 +00:00
62 lines
1.5 KiB
PHP
62 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace App\Notifications;
|
|
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Contracts\Queue\ShouldBeEncrypted;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Notifications\Messages\MailMessage;
|
|
use Illuminate\Notifications\Notification;
|
|
use Symfony\Component\Mime\Email;
|
|
|
|
class GpgKeyExpired extends Notification implements ShouldBeEncrypted, ShouldQueue
|
|
{
|
|
use Queueable;
|
|
|
|
/**
|
|
* Get the notification's delivery channels.
|
|
*
|
|
* @param mixed $notifiable
|
|
* @return array
|
|
*/
|
|
public function via($notifiable)
|
|
{
|
|
return ['mail'];
|
|
}
|
|
|
|
/**
|
|
* Get the mail representation of the notification.
|
|
*
|
|
* @param mixed $notifiable
|
|
* @return \Illuminate\Notifications\Messages\MailMessage
|
|
*/
|
|
public function toMail($notifiable)
|
|
{
|
|
return (new MailMessage)
|
|
->subject('Your GPG key has expired on addy.io')
|
|
->markdown('mail.gpg_key_expired', [
|
|
'recipient' => $notifiable,
|
|
'userId' => $notifiable->user_id,
|
|
'recipientId' => $notifiable->id,
|
|
'emailType' => 'GKE',
|
|
])
|
|
->withSymfonyMessage(function (Email $message) {
|
|
$message->getHeaders()
|
|
->addTextHeader('Feedback-ID', 'GKE:anonaddy');
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Get the array representation of the notification.
|
|
*
|
|
* @param mixed $notifiable
|
|
* @return array
|
|
*/
|
|
public function toArray($notifiable)
|
|
{
|
|
return [
|
|
//
|
|
];
|
|
}
|
|
}
|