Skip to main content
added 286 characters in body
Source Link
Mr J
  • 3k
  • 5
  • 46
  • 68

I'm running Laravel 5.4.24 and I can't get it to send through Amazon SES SMTP.

However when I download SwiftMailer and run it standalone I can.

Working..

require("vendor/autoload.php"); // Create the Transport $transport = new Swift_SmtpTransport('email-smtp.us-west-2.amazonaws.com', 587, 'tls'); $transport->setUsername('A**************A'); $transport->setPassword('A****************************m'); // Create the Mailer using your created Transport $mailer = new Swift_Mailer($transport); // Create a message $message = new Swift_Message('Wonderful Subject'); $message->setFrom(['noreply@su*****th.com' => 'John Doe']); $message->setTo(['j*******@gmail.com' => 'Jamie']); $message->setBody('Here is the message itself'); // Send the message $result = $mailer->send($message); 

Laravel setup thats not working

MAIL_DRIVER=smtp MAIL_HOST=email-smtp.us-west-2.amazonaws.com MAIL_PORT=587 MAIL_USERNAME=A****************A MAIL_PASSWORD=A************************m MAIL_ENCRYPTION=tls 

Even though the credentials are identical I get

Expected response code 250 but got code "530", with message "530 Authentication required 

I've tried

php artisan queue:restart php artisan config:cache 

This is how I'm using Mail in code

Mail::send('emails.verify', $data, function($message) use ($data) { $message->from('noreply@su*****h.com', "Jamie - ****"); $message->subject("Please verify your email address"); $message->to($data['email']); }); 

But with no luck.

Any ideas?

I'm running Laravel 5.4.24 and I can't get it to send through Amazon SES SMTP.

However when I download SwiftMailer and run it standalone I can.

Working..

require("vendor/autoload.php"); // Create the Transport $transport = new Swift_SmtpTransport('email-smtp.us-west-2.amazonaws.com', 587, 'tls'); $transport->setUsername('A**************A'); $transport->setPassword('A****************************m'); // Create the Mailer using your created Transport $mailer = new Swift_Mailer($transport); // Create a message $message = new Swift_Message('Wonderful Subject'); $message->setFrom(['noreply@su*****th.com' => 'John Doe']); $message->setTo(['j*******@gmail.com' => 'Jamie']); $message->setBody('Here is the message itself'); // Send the message $result = $mailer->send($message); 

Laravel setup thats not working

MAIL_DRIVER=smtp MAIL_HOST=email-smtp.us-west-2.amazonaws.com MAIL_PORT=587 MAIL_USERNAME=A****************A MAIL_PASSWORD=A************************m MAIL_ENCRYPTION=tls 

Even though the credentials are identical I get

Expected response code 250 but got code "530", with message "530 Authentication required 

I've tried

php artisan queue:restart php artisan config:cache 

But with no luck.

Any ideas?

I'm running Laravel 5.4.24 and I can't get it to send through Amazon SES SMTP.

However when I download SwiftMailer and run it standalone I can.

Working..

require("vendor/autoload.php"); // Create the Transport $transport = new Swift_SmtpTransport('email-smtp.us-west-2.amazonaws.com', 587, 'tls'); $transport->setUsername('A**************A'); $transport->setPassword('A****************************m'); // Create the Mailer using your created Transport $mailer = new Swift_Mailer($transport); // Create a message $message = new Swift_Message('Wonderful Subject'); $message->setFrom(['noreply@su*****th.com' => 'John Doe']); $message->setTo(['j*******@gmail.com' => 'Jamie']); $message->setBody('Here is the message itself'); // Send the message $result = $mailer->send($message); 

Laravel setup thats not working

MAIL_DRIVER=smtp MAIL_HOST=email-smtp.us-west-2.amazonaws.com MAIL_PORT=587 MAIL_USERNAME=A****************A MAIL_PASSWORD=A************************m MAIL_ENCRYPTION=tls 

Even though the credentials are identical I get

Expected response code 250 but got code "530", with message "530 Authentication required 

I've tried

php artisan queue:restart php artisan config:cache 

This is how I'm using Mail in code

Mail::send('emails.verify', $data, function($message) use ($data) { $message->from('noreply@su*****h.com', "Jamie - ****"); $message->subject("Please verify your email address"); $message->to($data['email']); }); 

But with no luck.

Any ideas?

Source Link
Mr J
  • 3k
  • 5
  • 46
  • 68

Laravel won't send through AWS SES SMTP

I'm running Laravel 5.4.24 and I can't get it to send through Amazon SES SMTP.

However when I download SwiftMailer and run it standalone I can.

Working..

require("vendor/autoload.php"); // Create the Transport $transport = new Swift_SmtpTransport('email-smtp.us-west-2.amazonaws.com', 587, 'tls'); $transport->setUsername('A**************A'); $transport->setPassword('A****************************m'); // Create the Mailer using your created Transport $mailer = new Swift_Mailer($transport); // Create a message $message = new Swift_Message('Wonderful Subject'); $message->setFrom(['noreply@su*****th.com' => 'John Doe']); $message->setTo(['j*******@gmail.com' => 'Jamie']); $message->setBody('Here is the message itself'); // Send the message $result = $mailer->send($message); 

Laravel setup thats not working

MAIL_DRIVER=smtp MAIL_HOST=email-smtp.us-west-2.amazonaws.com MAIL_PORT=587 MAIL_USERNAME=A****************A MAIL_PASSWORD=A************************m MAIL_ENCRYPTION=tls 

Even though the credentials are identical I get

Expected response code 250 but got code "530", with message "530 Authentication required 

I've tried

php artisan queue:restart php artisan config:cache 

But with no luck.

Any ideas?