I use SwiftMailer to send emails from a gearman worker process. I\'m using the Swift_SmtpTransport
class to send emails.
The problem is that if this wor
I'm running a worker in an infinite loop using Swiftmailer and AWS SES I was getting the error:
Expected response code 250 but got code "421", with message "421 Timeout waiting for data from client.
Solution for my script:
$love = true;
while($love) {
$message = Message::to($record->to)
->from(array('no-reply@clouddueling.com' => $user->name()))
->reply(array($user->email => $user->name()))
->subject($record->subject)
->body($body->value)
->html(true)
->send();
if (! $message->was_sent())
throw new Swift_TransportException($errstr . ': ' . $errno);
}