presseportale/app/Mail/ContactRequestSubmitted.php
Kevin Adametz fd8e050cb7 Backend-WIP: Kontakt-Queue, Page-Cache, Validierungs-Feedback, i18n
Gebuendelt, da ueber gemeinsame lang-/Service-Dateien verschraenkt:
- Kontakt-Nachrichten: contact_messages-Tabelle + Model/Enums/Factory,
  Admin-Queue (livewire/admin/contact-messages), ContactController
  persistiert das Anliegen zusaetzlich zur Brand-Mail
- Page-Data-Cache (Services/Web/*PageData) + web-archive-Indizes auf
  press_releases
- Validierungs-Feedback + Company-Portal-Restriction (Feature-Tests)
- i18n-Auslagerung lang/de|en (auth, passwords, validation, static)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-09 15:38:11 +00:00

43 lines
1.2 KiB
PHP

<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Address;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
class ContactRequestSubmitted extends Mailable
{
use Queueable, SerializesModels;
public function __construct(
public readonly string $senderName,
public readonly string $senderEmail,
public readonly string $messageText,
public readonly string $host,
public readonly ?string $topicLabel = null,
public readonly ?string $pageUrl = null,
) {}
public function envelope(): Envelope
{
$subject = 'Neue Kontaktanfrage über '.$this->host;
if ($this->topicLabel !== null && $this->topicLabel !== 'Kontaktaufnahme') {
$subject = 'Neue '.$this->topicLabel.' über '.$this->host;
}
return new Envelope(
subject: $subject,
replyTo: [new Address($this->senderEmail, $this->senderName)],
);
}
public function content(): Content
{
return new Content(view: 'emails.contact.submitted');
}
}