The env key is MAIL_MAILER, not ses; and, since there is no ses key, the env() function returns the default 'log' instead
// config/mail.php
'default' => env('MAIL_MAILER', 'log'),
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi Guys - Trying to figure out what's going wrong in my linkage to AWS SES that the Laravel Mail is sending the content to the log file instead of SES from my local maching.
I'm regularly up/downloading files via Amazon S3, so I know my credentials are in order and I know the Mail is working as it populates the log with the expected content, but I've included it below in case I've missed something important.
Your additional eyes are appreciated!
My configs/mail file:
<?php
return [
'default' => env('ses', 'log'),
'mailers' => [
'smtp' => [
'transport' => 'smtp',
'url' => env('MAIL_URL'),
'host' => env('MAIL_HOST', '127.0.0.1'),
'port' => env('MAIL_PORT', 2525),
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'timeout' => null,
'local_domain' => env('MAIL_EHLO_DOMAIN'),
],
'ses' => [
'transport' => 'ses',
],
'postmark' => [
'transport' => 'postmark',
],
'sendmail' => [
'transport' => 'sendmail',
'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'),
],
'log' => [
'transport' => 'log',
'channel' => env('MAIL_LOG_CHANNEL'),
],
'array' => [
'transport' => 'array',
],
'failover' => [
'transport' => 'failover',
'mailers' => [
'smtp',
'log',
],
],
'roundrobin' => [
'transport' => 'roundrobin',
'mailers' => [
'ses',
'postmark',
],
],
],
'from' => [
'address' => env('MAIL_FROM_ADDRESS', '[email protected]'),
'name' => env('MAIL_FROM_NAME', 'Rick Retzko'),
],
];
The Mail file is:
<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Address;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
class RequestInvitationToEventMail extends Mailable
{
use Queueable, SerializesModels;
public function __construct()
{
//
}
public function envelope(): Envelope
{
return new Envelope(
from: new Address('[email protected]', 'Rick Retzko'),
subject: 'Request Invitation To Event Mail',
);
}
public function content(): Content
{
return new Content(
view: 'mail.requestInvitationToEvent',
with: [
'name' => 'Name',
'schoolVo' => 'schoolVo',
'workEmail' => '[email protected]',
'verificationUrl' => '12345',
],
);
}
public function attachments(): array
{
return [];
}
}
My .env file has the following settings:
BROADCAST_CONNECTION=log
FILESYSTEM_DISK=local
QUEUE_CONNECTION=database
MAIL_MAILER=ses
MAIL_HOST=127.0.0.1
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="[email protected]"
MAIL_FROM_NAME="${APP_NAME}"
AWS_ACCESS_KEY_ID=***************************************
AWS_SECRET_ACCESS_KEY=********************************
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=production-bucket
AWS_USE_PATH_STYLE_ENDPOINT=false
Thanks for your help!
The env key is MAIL_MAILER, not ses; and, since there is no ses key, the env() function returns the default 'log' instead
// config/mail.php
'default' => env('MAIL_MAILER', 'log'),
Please or to participate in this conversation.