Zum Hauptinhalt springen

Email Not Sending

Step-by-step troubleshooting for email delivery issues.


Step 1: Check the Basicsโ€‹

# Check .env SMTP settings
grep MAIL_ .env

Verify:

  • MAIL_MAILER=smtp (not log or null)
  • MAIL_HOST is correct
  • MAIL_PORT is correct (587 for TLS, 465 for SSL)
  • MAIL_USERNAME and MAIL_PASSWORD are filled
  • MAIL_ENCRYPTION=tls (or ssl)

Step 2: Test via Admin Panelโ€‹

  1. Gehen Sie zu Admin > Einstellungen > Email
  2. Click Send Test Email
  3. Check the error message if it fails

Step 3: Test via Command Lineโ€‹

php artisan tinker
Mail::raw('Test', function ($m) {
$m->to('[email protected]')->subject('Test');
});

Check storage/logs/laravel.log for errors.


Haeufige Problemeโ€‹

IssueSolution
"Connection timed out"Port 587/465 blocked by hosting. Try port 2525 or contact host.
"Authentication failed"Wrong username/password. For Gmail, use App Password.
"Certificate verify failed"Old PHP. Try 'verify_peer' => false in config/mail.php mailer options.
Emails going to spamAdd SPF, DKIM, and DMARC DNS records.
Emails delayedUsing QUEUE_CONNECTION=database? Ensure queue worker is running.
No error but no emailUsing MAIL_MAILER=log? Emails are being logged, not sent. Check storage/logs/laravel.log.

Using MAIL_MAILER=log for Debuggingโ€‹

Set MAIL_MAILER=log in .env to capture all emails in the log file instead of sending them. Useful for verifying email content without affecting real recipients.


Naechste Schritteโ€‹