Operating mode in the admin (test mode sends all mail to a test recipient until switched live), bot protection for booking requests, mail rendering tests, mail:test command

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Lars StommerandClaude Opus 5.5 committed 2026-10-22 23:01:44 +02:00
1 parent fdcb68d578
commit d018c97be4
22 files changed
+698 -23

No files matched your search

+3 -5
View File
@@ -2,9 +2,9 @@
namespace App\Providers;
use App\Support\Settings;
use App\Support\StripImageMetadata;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Facades\URL;
use Illuminate\Support\ServiceProvider;
use Spatie\MediaLibrary\MediaCollections\Events\MediaHasBeenAddedEvent;
@@ -24,10 +24,8 @@ public function register(): void
*/
public function boot(): void
{
// Test environments: deliver every e-mail to one address only, so no guest gets test mails.
if (filled(config('fewo.mail_redirect_to'))) {
Mail::alwaysTo(config('fewo.mail_redirect_to'));
}
// Test mode (System › Betrieb, default until switched live): every e-mail goes to the test recipient only.
Settings::applyMailRouting();
// Photos: remove metadata (GPS position, camera data) from uploaded originals, which stay downloadable.
Event::listen(MediaHasBeenAddedEvent::class, fn (MediaHasBeenAddedEvent $event) => StripImageMetadata::strip($event->media));