Skip to content

Mail configuration

ExchangePro sends email for:

FeatureWhen
Password resetUser requests forgot password
Email verification6-digit code on signup (if enabled)
Admin-created usersCredentials email with password
Subscriber broadcastAdmin 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=log

Emails are written to storage/logs/laravel.log instead of being sent.

Password reset flow

  1. User submits email on /forgot-password.
  2. API sends Laravel reset link built with FRONTEND_URL:
    text
    {FRONTEND_URL}/reset-password?token=...&email=...
  3. 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-code succeeds.

Throttle: resend endpoint is rate-limited — wait between attempts.

Testing mail

bash
php artisan tinker
php
Mail::raw('Test', fn ($m) => $m->to('you@example.com')->subject('ExchangePro test'));

Or trigger forgot-password from the UI.

Common providers

ProviderNotes
MailgunSet MAIL_HOST, MAIL_USERNAME, MAIL_PASSWORD from domain settings
Amazon SESUse SES SMTP credentials
PostmarkSMTP token as password
GmailUse app password; not ideal for production volume

Troubleshooting

SymptomFix
No emailsCheck MAIL_*, firewall port 587/465, spam folder
Reset link goes to localhostFix FRONTEND_URL on backend
Verification never arrivesEnable correct SMTP; check storage/logs if using log driver

Need help? support@xorinlab.com · Website: xorinlab.com