60 lines
1.4 KiB
PHP
60 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Mail;
|
|
|
|
use App\Models\ClientCallNote;
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Mail\Mailable;
|
|
use Illuminate\Mail\Mailables\Content;
|
|
use Illuminate\Mail\Mailables\Envelope;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
class ClientCallMomMail extends Mailable
|
|
{
|
|
use Queueable, SerializesModels;
|
|
|
|
public ClientCallNote $callNote;
|
|
public string $recipientName;
|
|
|
|
/**
|
|
* Create a new message instance.
|
|
*/
|
|
public function __construct(ClientCallNote $callNote, string $recipientName = 'Team Member')
|
|
{
|
|
$this->callNote = $callNote;
|
|
$this->recipientName = $recipientName;
|
|
}
|
|
|
|
/**
|
|
* Get the message envelope.
|
|
*/
|
|
public function envelope(): Envelope
|
|
{
|
|
$meetingTitle = $this->callNote->meeting ? $this->callNote->meeting->title : 'Client Call';
|
|
$projectName = $this->callNote->client ? $this->callNote->client->project_name : 'Project';
|
|
return new Envelope(
|
|
subject: "📝 Minutes of Meeting (MoM) & AI Notes: {$meetingTitle} - {$projectName}",
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Get the message content definition.
|
|
*/
|
|
public function content(): Content
|
|
{
|
|
return new Content(
|
|
view: 'emails.call_mom',
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Get the attachments for the message.
|
|
*
|
|
* @return array<int, \Illuminate\Mail\Mailables\Attachment>
|
|
*/
|
|
public function attachments(): array
|
|
{
|
|
return [];
|
|
}
|
|
}
|