CONSOLE
Loading
Integrate high-speed authenticated SMTP into Laravel in under 2 minutes. Eliminate checkout lag with asynchronous queue workers and achieve sub-700ms OTP delivery.
In Laravel 10 and 11, configure an external SMTP relay by updating your .env file with MAIL_MAILER=smtp, MAIL_HOST=mail.photonrelay.com, MAIL_PORT=587, MAIL_ENCRYPTION=tls, and your authenticated API credentials. For production high-throughput, dispatch emails through queued Mailable classes using implements ShouldQueue.
Add the following configuration directives to your Laravel root .env file:
MAIL_MAILER=smtp
MAIL_HOST=mail.photonrelay.com
MAIL_PORT=587
MAIL_USERNAME=your_photon_api_key
MAIL_PASSWORD=your_photon_api_secret
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS="notifications@yourdomain.com"
MAIL_FROM_NAME="${APP_NAME}"
MAIL_TIMEOUT=15
After editing, clear your cached configuration:
php artisan config:clear
php artisan config:cache
Laravel allows you to configure multi-mailer failover groups. If the primary connection experiences a timeout, Symfony Mailer automatically routes to the secondary mailer:
// config/mail.php
'mailers' => [
'failover' => [
'transport' => 'failover',
'mailers' => [
'photonrelay',
'ses',
],
],
'photonrelay' => [
'transport' => 'smtp',
'host' => env('MAIL_HOST', 'mail.photonrelay.com'),
'port' => env('MAIL_PORT', 587),
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
],
],
Never send transactional emails synchronously during an HTTP request. Implement the ShouldQueue interface on your Mailable class:
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
class OrderReceiptMail extends Mailable implements ShouldQueue
{
use Queueable, SerializesModels;
// ...
}
Verify connectivity directly from the terminal without building a test route:
php artisan tinker
# Execute inside Tinker:
Mail::raw('Testing PhotonRelay delivery in Laravel', function ($m) {
$m->to('your-email@example.com')->subject('Laravel SMTP Test');
});
Enjoy 5,000 free transactional emails every month. Scale at a flat $0.50 per 1,000 with dedicated Anycast edge acceleration.
Trademark Notice & Nominative Fair Use: All third-party trademarks, logos, and service marks (SendGrid®, Mailgun®, Amazon SES®, Postmark®, Resend®, Brevo®, SMTP2Go®, SparkPost®) are property of their respective owners and used under 15 U.S.C. § 1115(b)(4).
Photon Console is independent and not affiliated with or endorsed by these providers. Pricing and plan details compiled from public sources as of November 2026. Read full legal disclaimer →