Certified/app/Mail/SharedCertificatesMail.php
Joël van de Wouw ac340d125c
Some checks failed
linter / quality (push) Failing after 13s
tests / ci (8.3) (push) Failing after 2s
tests / ci (8.4) (push) Failing after 2s
tests / ci (8.5) (push) Failing after 3s
Initial commit
Certificate manager built on Laravel 13, Livewire 4, and Flux.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-12 14:44:58 +02:00

50 lines
1.2 KiB
PHP

<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Attachment;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
class SharedCertificatesMail extends Mailable
{
use Queueable, SerializesModels;
/**
* @param string $zipPath Absolute path to the password-protected archive.
*/
public function __construct(
public string $senderName,
public string $zipPath,
) {}
public function envelope(): Envelope
{
return new Envelope(
subject: __(':name shared certificates with you', ['name' => $this->senderName]),
);
}
public function content(): Content
{
return new Content(
markdown: 'mail.shared-certificates',
with: ['senderName' => $this->senderName],
);
}
/**
* @return array<int, Attachment>
*/
public function attachments(): array
{
return [
Attachment::fromPath($this->zipPath)
->as('certificates.zip')
->withMime('application/zip'),
];
}
}