Appearance
Mail configuration
ExchangePro sends email for:
| Feature | When |
|---|---|
| Password reset | User requests forgot password |
| Email verification | 6-digit code on signup (if enabled) |
| Admin-created users | Credentials email with password |
| Subscriber broadcast | Admin sends newsletter from subscribers module |
Backend .env (SMTP example)
ini
MAIL_MAILER=smtp
MAIL_HOST=smtp.mailgun.org
MAIL_PORT=587
MAIL_USERNAME=postmaster@yourdomain.com
MAIL_PASSWORD=your-smtp-password
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=noreply@yourdomain.com
MAIL_FROM_NAME="ExchangePro"Development — log driver
ini
MAIL_MAILER=logEmails are written to storage/logs/laravel.log instead of being sent.
Password reset flow
- User submits email on
/forgot-password. - API sends Laravel reset link built with
FRONTEND_URL:text{FRONTEND_URL}/reset-password?token=...&email=... - User sets a new password on the frontend; API validates via
POST /api/auth/reset-password.
Ensure FRONTEND_URL in backend .env matches your live Nuxt URL.
Email verification
Enable in Admin → Settings → System configuration.
When on:
- New signups receive
EmailVerificationCodeMail. - Sign-in is blocked until
POST /api/auth/verify-email-codesucceeds.
Throttle: resend endpoint is rate-limited — wait between attempts.
Testing mail
bash
php artisan tinkerphp
Mail::raw('Test', fn ($m) => $m->to('you@example.com')->subject('ExchangePro test'));Or trigger forgot-password from the UI.
Common providers
| Provider | Notes |
|---|---|
| Mailgun | Set MAIL_HOST, MAIL_USERNAME, MAIL_PASSWORD from domain settings |
| Amazon SES | Use SES SMTP credentials |
| Postmark | SMTP token as password |
| Gmail | Use app password; not ideal for production volume |
Troubleshooting
| Symptom | Fix |
|---|---|
| No emails | Check MAIL_*, firewall port 587/465, spam folder |
| Reset link goes to localhost | Fix FRONTEND_URL on backend |
| Verification never arrives | Enable correct SMTP; check storage/logs if using log driver |