thebigk's avatar
Level 13

Are Amazon SES SMTP credentials required when using SES Key and Secret?

I've been following the documentation to try sending email via Amazon SES and getting following errror:

Swift_TransportException (530)
Expected response code 250 but got code "530", with message "530 5.7.1 Authentication required "

I'm guessing that Laravel's SwiftMailer is having problems authenticating with SES. Here's my setup:

  1. I've an IAM setup with FullSESAccess policy.
  2. In App/Services.php, I've setup
'ses' => [
        'key' => env('MY-AweS0me-KeY'),
        'secret' => env('the-secret-key'),
        'region' => 'us-east-1',
    ],

I think this should suffice. I checked a few other threads that say you need to include SMTP credentials. I'm not sure if I really have to.

If that's not the problem, what could be causing this issue?

0 likes
2 replies
martinbean's avatar

@thebigk You should generate an access key and secret for a user in your AWS console, that has permissions to send emails via SES. You’ll then need to update your MAIL_DRIVER environment variable to ses, as it looks like you’re still trying to send emails via SMTP from the given error message.

1 like
thebigk's avatar
Level 13

@martinbean - Just got it working a few seconds ago. Here's what I did:

  1. Mail Driver was set to SES from the .env file. Also set my SES API key and secret in it.

  2. I had to clear cache php artisan cache:clear and php artisan config:clear and also restart valet.

Can now send mails. It's unbelievably easy and cool!

2 likes

Please or to participate in this conversation.