add test batches

This commit is contained in:
root
2026-06-08 23:45:55 -04:00
parent c792b8be05
commit 8d4d610b82
1480 changed files with 22587 additions and 10762 deletions
@@ -7,7 +7,9 @@ use Illuminate\Support\Facades\Log;
class ContactMessageService
{
public function __construct(private EmailDispatchService $emailService) {}
public function __construct(private EmailDispatchService $emailService)
{
}
public function send(array $payload): array
{
@@ -18,17 +20,17 @@ class ContactMessageService
$formatted = "<p><strong>From:</strong> {$name} ({$email})</p>";
$formatted .= "<p><strong>Subject:</strong> {$subject}</p>";
$formatted .= '<p>'.nl2br($message).'</p>';
$formatted .= '<p>' . nl2br($message) . '</p>';
$recipient = (string) config('support.contact_email', 'support@alrahmaisgl.org');
$emailSent = false;
if (! app()->runningUnitTests()) {
if (!app()->runningUnitTests()) {
$emailSent = $this->emailService->send($recipient, $subject, $formatted, null, $email, $name);
}
if (! $emailSent) {
Log::warning('Contact email failed for '.$email);
if (!$emailSent) {
Log::warning('Contact email failed for ' . $email);
}
return [