Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure Amazon SES SMTP in PHP Laravel 5?

I have integrated Amazon SES in PHP Laravel5 project but i have troubled to send email's because i am getting this error,

Swift_TransportException in AbstractSmtpTransport.php line 383:
Expected response code 250 but got code "530", with message "530 Authentication required" 

Can anyone tell me how to configure Amazon SES..

like image 658
parthi Avatar asked Nov 29 '16 06:11

parthi


People also ask

How can I send email to Amazon SES in PHP?

$host = ' email-smtp.us-west-2.amazonaws.com '; $port = 587; // The subject line of the email $subject = 'Amazon SES test (SMTP interface accessed using PHP)'; // The plain-text body of the email $bodyText = "Email Test\r\nThis email was sent through the Amazon SES SMTP interface using the PHPMailer class."; // The ...

What is Amazon SES configuration?

Configuration sets are groups of rules that you can apply to your verified identities. A verified identity is a domain, subdomain, or email address you use to send email through Amazon SES When you apply a configuration set to an email, all of the rules in that configuration set are applied to the email.


1 Answers

Ensure you have configured your environment variables:

like the following:

MAIL_DRIVER=smtp
MAIL_HOST=email-smtp.us-west-2.amazonaws.com
MAIL_PORT=587
MAIL_USERNAME=AKIAJ3RS7BUIV7U2LCIQ
MAIL_PASSWORD=Av9/1W4ZfcinolyP+8PNvjyQk7owOxaIMUehg53/QhnH
MAIL_ENCRYPTION=tls

I just open a terminal and wrote the following commands:

> Composer update(optional)

> php artisan queue:restart

then it should work.

You have to write to support and ask for moving out of the amazon ses sand box

hope helps

like image 87
Oscar Gallardo Avatar answered Sep 28 '22 03:09

Oscar Gallardo