Laravel email with queue 550 error (too many emails per second)

tim peterson picture tim peterson · Feb 10, 2016 · Viewed 21.4k times · Source

Our emails are failing to send using Laravel with a Redis Queue.

The code that triggers the error is this: ->onQueue('emails')

$job = (new SendNewEmail($sender, $recipients))->onQueue('emails');
$job_result = $this->dispatch($job);

In combination with this in the job:

use InteractsWithQueue;

Our error message is:

Feb 09 17:15:57 laravel: message repeated 7947 times: [ production.ERROR: exception 'Swift_TransportException' with message 'Expected response code 354 but got code "550", with message "550 5.7.0 Requested action not taken: too many emails per second "' in /home/laravel/app/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:383 Stack trace: #0 /home/laravel/app/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(281): 

Our error only happens using Sendgrid and not Mailtrap, which spoofs emailing sending. I've talked with Sendgrid and the emails never touched their servers and their service was fully active when my error occurred. So, the error appears to be on my end.

Any thoughts?

Answer

Dorian picture Dorian · Mar 4, 2017

Seems like only Mailtrap sends this error, so either open another account or upgrade to a paid plan.