63 lines
1.4 KiB
PHP
63 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Mail\ManualMails;
|
|
|
|
use App\Models\Event;
|
|
use App\Models\EventParticipant;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Mail\Mailable;
|
|
use Illuminate\Mail\Mailables\Attachment;
|
|
use Illuminate\Mail\Mailables\Content;
|
|
use Illuminate\Mail\Mailables\Envelope;
|
|
|
|
class ManualMailsReportMail extends Mailable {
|
|
public function __construct(
|
|
private string $mailSubject,
|
|
private string $message,
|
|
private array $event,
|
|
private array $originalRecipients,
|
|
|
|
)
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Get the message envelope.
|
|
*/
|
|
public function envelope(): Envelope
|
|
{
|
|
return new Envelope(
|
|
subject: $this->mailSubject,
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Get the message content definition.
|
|
*/
|
|
public function content(): Content
|
|
{
|
|
return new Content(
|
|
view: 'emails.events.manual_mail_report',
|
|
with: [
|
|
'mailMessage' => ($this->message),
|
|
'eventTitle' => $this->event['name'],
|
|
'eventEmail' => $this->event['email'],
|
|
'recipients' => implode('<br />', $this->originalRecipients),
|
|
'countRecipients' => count($this->originalRecipients),
|
|
],
|
|
);
|
|
}
|
|
|
|
|
|
/**
|
|
* Get the attachments for the message.
|
|
*
|
|
* @return array<int, Attachment>
|
|
*/
|
|
public function attachments(): array
|
|
{
|
|
return [];
|
|
}
|
|
}
|