@php $grouped = collect($purposes)->groupBy(fn ($p) => $p['group'] ?? 'Other'); @endphp

SMTP / mail profiles

Create separate transports (Gmail, SES, transactional ESP, CRM ESP) and assign them by purpose below. Passwords are encrypted at rest.

New profile
@forelse($mailProfiles as $profile) @empty @endforelse
Name Transport Host From Status
{{ $profile->name }}
{{ $profile->key }}
{{ $profile->transport }} {{ $profile->host ?: '—' }}{{ $profile->port ? ':'.$profile->port : '' }} {{ $profile->from_address ?: '—' }} @if($profile->is_default)Default@endif {{ $profile->is_active ? 'Active' : 'Off' }} Edit
No profiles yet.
@if(request('profile') === 'new' || $editingProfile) @php $p = $editingProfile; @endphp

{{ $p ? 'Edit profile' : 'New mail profile' }}

@csrf @if($p) @method('PUT') @endif
Cancel
@if($p)
@csrf

Send test email

@unless($p->is_default)
@csrf @method('DELETE')

Delete profile

Purposes using this profile will fall back to the default.

@endunless
@endif
@endif

Purpose → SMTP routing

Assign a different profile for signup, password resets, order mail, CRM stage updates, and more. Leave as “Default profile” to inherit.

@csrf @method('PUT') @foreach($grouped as $group => $items)

{{ $group }}

@foreach($items as $purposeKey => $meta)
{{ $meta['label'] }}
{{ $meta['description'] }}
@endforeach
@endforeach