@extends('layouts.admin') @section('title', 'Email (SMTP) Settings') @section('content')

Email (SMTP) Configuration

Configure the outgoing mail server used by JOTI Journal for password resets, notifications and other system emails.

@if ($errors->any()) @endif
{{-- ───────────────── Settings form (left, wider) ───────────────── --}}
SMTP Server Details
@csrf
Use log for development — emails are written to storage/logs/laravel.log.
For Gmail, use a 16-character App Password, not the account password. {{ $setting->password ? 'A password is currently saved.' : 'No password saved yet.' }}

{{-- ───────────────── Side panel: test + status ───────────────── --}}
Send Test Email

Sends a test message using the values currently in the form (no save required). Useful for verifying credentials before committing.

Last Test
@if ($setting->last_tested_at)
When
{{ $setting->last_tested_at->format('d M Y, H:i') }}
Status
@if ($setting->last_test_status === 'success') Success @else Failed @endif
@if ($setting->last_test_error)
Error
{{ $setting->last_test_error }}
@endif
@else

No test has been run yet.

@endif
@endsection @push('scripts') @endpush