markemacht/app/Mail/AuditAnfrage.php
Kevin Adametz 1f7c0aa430 feat(marketing): Audit-Anfrageformular als Livewire-Komponente
Das markemacht.de-Anfrageformular (Audit-Modal) war nach der Laravel-
Integration ohne Endpoint. Es wird jetzt serverseitig über Livewire
verarbeitet statt über das alte statische PHP-Skript.

- AuditAnfrage-Mailable + Mail-View, Reply-To = Absender
- config/marketing.php: Empfänger via MARKETING_ANFRAGE_TO (Default info@markemacht.de)
- Livewire-SFC web.audit-form: Validierung (dt.), Honeypot, Rate-Limit (3/10 Min),
  dispatch('audit-sent') schließt das Modal
- Modal-Markup auf <livewire:web.audit-form /> umgestellt
- Feature-Tests (Validierung, Versand, Honeypot, Throttle)
- Entwicklungsplan unter dev/audit-formular-cookies/

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 13:20:21 +00:00

47 lines
1 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 AuditAnfrage extends Mailable
{
use Queueable, SerializesModels;
/**
* Create a new message instance.
*/
public function __construct(
public string $anfrageName,
public string $anfrageEmail,
public string $anfrageMessage,
) {}
/**
* Get the message envelope.
*
* Antwort geht direkt an den Absender der Anfrage (Reply-To).
*/
public function envelope(): Envelope
{
return new Envelope(
subject: 'Neue Anfrage über markemacht.de',
replyTo: [new Address($this->anfrageEmail, $this->anfrageName)],
);
}
/**
* Get the message content definition.
*/
public function content(): Content
{
return new Content(
view: 'mail.audit-anfrage',
);
}
}