Skip to content
This repository has been archived by the owner on Feb 6, 2022. It is now read-only.

Expected response code 250 but got code "421", with message "421 Timeout waiting for data from client. #39

Closed
pmoubed opened this issue Jun 7, 2013 · 3 comments

Comments

@pmoubed
Copy link

pmoubed commented Jun 7, 2013

This happens when I use it with AWS and For Loop to send emails. I don't use spool.

@dmcfaul
Copy link

dmcfaul commented May 6, 2014

Is this issue going to be looked at? I have the same issue. The connection times out, would be nice if there was a reconnect method that I could use when this is thrown.

@dmcfaul
Copy link

dmcfaul commented May 6, 2014

looks like if you do a:
$mailer->getTransport()->stop();
Swiftmailer will then reconnect automatically. So just catch the Exception in a try/catch and then stop and retry sending.

@kgreen169
Copy link

It's 2018 and I am having this exact same problem. I have tried multiple ways to get around this error. Here is my latest
try {
$sendSuccess .= $mailer->send($message, $failedRecipients);
} catch (Swift_TransportException $ste) {
$mailSuccess .= "
Caught Swift_TransportException ste calling mailer->send
";
$mailSuccess .= $ste->getMessage();
$mailSuccess .= "
End ste->getMessage. Stoping transport
";
$mailer->getTransport()->stop();
$sendSuccess .= $mailer->send($message, $failedRecipients);
}
not sure if I am using ->stop correctly

Still got exception
Expected response code 250 but got code "421", with message "421 4.7.0 Try again later, closing connection. (MAIL) k130-v6sm1483348itb.0 - gsmtp "\

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants