If your Laravel application is not sending emails, the problem is usually related to incorrect SMTP credentials, mail configuration, queue workers, or your email provider rejecting outgoing messages. Sometimes Laravel reports that an email was sent successfully even though it never reaches the recipient's inbox.
To fix the issue, check your mail settings in the .env file, verify the SMTP connection, clear Laravel's configuration cache, and inspect your application logs. I usually start with these checks before changing the mail implementation or debugging the email provider.
Why Laravel Emails Are Not Sending
Laravel uses its mail system, built on Symfony Mailer, to send messages through services such as SMTP servers, Amazon SES, Mailgun, Postmark, and other supported transports. If any part of this process is incorrectly configured, email delivery can fail.
These are the most common reasons why Laravel emails are not sending:
- Incorrect SMTP host, port, username, or password.
- Wrong mail encryption or SMTP authentication settings.
- Cached configuration containing outdated mail credentials.
- Emails dispatched to a queue without an active queue worker.
- SMTP connections blocked by the hosting provider or firewall.
- Invalid sender address or email provider restrictions.
- Exceptions inside the Mailable class or email template.
1. Check Your Laravel SMTP Configuration
Incorrect SMTP credentials are one of the first things I check when an application cannot send emails. Open your Laravel project's .env file and review the mail configuration.
For Laravel 9 and newer versions using the standard SMTP mailer configuration, a typical setup looks like this:
MAIL_MAILER=smtp
MAIL_HOST=smtp.example.com
MAIL_PORT=587
MAIL_USERNAME=your-email@example.com
MAIL_PASSWORD=your-email-password
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=your-email@example.com
MAIL_FROM_NAME="My Laravel Application"
Replace these values with the SMTP details supplied by your email provider. Port 587 commonly uses STARTTLS, while port 465 commonly uses implicit TLS. Follow your provider's recommended combination rather than guessing the encryption setting.
Also check that the sender address is authorized by your SMTP provider. Some services reject messages when the MAIL_FROM_ADDRESS does not belong to a verified domain or account.
2. Clear Laravel Configuration Cache
If you updated your .env file but Laravel continues using old SMTP credentials, cached configuration may be the reason. Laravel does not automatically reload environment values when configuration is cached.
Run these commands from your project directory:
php artisan config:clear
php artisan cache:clear
If your production application uses cached configuration, rebuild it after confirming the environment values:
php artisan config:cache
Restart long-running application processes and queue workers after changing configuration. They may continue using values loaded before the changes.
3. Check Whether Laravel Is Using a Queue
Another common reason emails appear not to send is that they are queued instead of being delivered immediately. If your Mailable implements ShouldQueue, Laravel dispatches the email to your configured queue connection.
For example:
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
class WelcomeEmail extends Mailable implements ShouldQueue
{
public function __construct(
public string $username
) {}
public function build(): static
{
return $this->subject('Welcome to our application')
->view('emails.welcome');
}
}
If the queue connection is set to database, make sure the queue tables exist and a worker is running. Create the migration if needed and run:
php artisan make:queue-table
php artisan migrate
php artisan queue:work
The queue table migration command is appropriate for Laravel versions that provide it. If your project already has the queue migration, you do not need to generate it again.
For production, run queue workers through a process manager such as Supervisor so they remain active. Check failed jobs with:
php artisan queue:failed
To retry failed jobs after resolving the underlying problem, use:
php artisan queue:retry all
If you are using the sync queue connection, queued jobs execute immediately in the current request, so a separate worker is not required.
4. Test Email Sending Without a Queue
Before debugging queue processing, test whether Laravel can send a basic email directly. This helps separate SMTP problems from queue-related problems.
You can temporarily run the following code in a route or another controlled testing environment:
use Illuminate\Support\Facades\Mail;
Route::get('/test-email', function () {
Mail::raw('This is a Laravel SMTP test email.', function ($message) {
$message->to('recipient@example.com')
->subject('Laravel Email Test');
});
return 'Email sending was attempted.';
});
Replace the recipient address with an address you control. Restrict or remove this temporary route after testing, especially on production websites. The response only confirms that the mail operation completed without throwing an exception; it does not guarantee inbox delivery.
5. Check Laravel Mail Configuration and Version Compatibility
Sometimes the environment variables are correct, but the mail configuration file contains custom settings or an outdated mailer definition. Open config/mail.php and check that its default mailer uses the environment configuration.
A standard configuration includes:
'default' => env('MAIL_MAILER', 'log'),
'mailers' => [
'smtp' => [
'transport' => 'smtp',
'scheme' => env('MAIL_SCHEME'),
'url' => env('MAIL_URL'),
'host' => env('MAIL_HOST', '127.0.0.1'),
'port' => env('MAIL_PORT', 2525),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'timeout' => null,
],
],
This is an illustrative excerpt, not a replacement for your complete configuration file. Keep the other settings supplied by your Laravel version. Laravel 9 and newer use Symfony Mailer, while older Laravel releases may use SwiftMailer and different configuration options. Avoid copying legacy mail settings into a newer project without checking its version.
6. Check SMTP Connection and Hosting Restrictions
If your SMTP credentials are correct but Laravel still cannot connect, your hosting provider or firewall may be blocking outgoing SMTP traffic.
On a server with the necessary network tools installed, test connectivity to your SMTP host:
nc -vz smtp.example.com 587
Replace the hostname and port with your provider's actual settings. A connection failure may indicate a blocked port, DNS issue, incorrect hostname, or unavailable SMTP server. Ask your hosting provider whether outbound SMTP connections are permitted.
For TLS-related errors, verify that your server has a current CA certificate bundle and that its system clock is correct. Do not disable certificate verification to bypass a TLS error.
7. Inspect Laravel Logs for Email Errors
Laravel logs usually provide the most useful information when email delivery fails. Check the latest application log:
tail -f storage/logs/laravel.log
Look for errors such as authentication failures, connection timeouts, invalid recipients, transport exceptions, or rejected sender addresses.
During local development, you can also use Laravel's log mailer to inspect generated messages without sending real emails:
MAIL_MAILER=log
With this setting, Laravel writes email output to its configured log instead of delivering it through SMTP. Remember to restore your intended mailer before deploying.
8. Check Your Email Provider's Delivery Status
If Laravel completes the SMTP operation without an exception but the recipient does not receive the email, investigate the provider's delivery logs. The provider may have accepted the message but later rejected or bounced it.
Check the following:
- Whether the recipient address is valid.
- Whether the message appears in your provider's delivery activity.
- Whether the sending domain has valid SPF and DKIM records.
- Whether a DMARC policy is affecting authentication.
- Whether the message was delivered to spam or quarantine.
- Whether your provider has sending limits or account restrictions.
SPF, DKIM, and DMARC are domain-level email authentication mechanisms. Correct SMTP credentials alone do not guarantee that messages will reach the inbox.
Frequently Asked Questions
Why does Laravel say email sent successfully but no email arrives?
Laravel may have successfully handed the message to the SMTP server without guaranteeing final delivery. Check your provider's delivery logs, spam folder, sender authentication, and bounce records.
Why are Laravel queued emails not sending?
Check the configured queue connection and make sure a queue worker is running. Use php artisan queue:failed to inspect failed jobs and check your application logs for exceptions.
How do I test SMTP settings in Laravel?
Send a simple message using Mail::raw() and inspect the resulting exception or application logs. You can also test network connectivity to your SMTP server using nc when available.
Why are Laravel emails not sending after deployment?
Production deployments commonly expose missing environment variables, stale configuration caches, blocked SMTP ports, or queue workers that have not been restarted. Verify the production environment and restart long-running processes after configuration changes.
Final Troubleshooting Advice
When investigating why Laravel emails are not sending, work through the problem in a specific order: verify SMTP credentials, clear configuration cache, test direct email delivery, inspect queue workers, and review application and provider logs.
Avoid changing several mail settings simultaneously. Testing one issue at a time makes it easier to identify the actual cause and prevents introducing additional configuration problems.
Comments
No comments yet. Did this work for you, or did you hit something different? Ask below.
Leave a comment
Comments are reviewed before they appear. Your email is never shown.