Sending emails that way used to work fine but the other day, in the mail of a script sending a lot of emails, I started getting this error for every email sent:
"Expected response code 250 but got code "", with message """
I cannot find any help on the Amazon SES website.
in my case it was because of email processing handled by queue worker, and it looks like transport is open until worker process end, so Swiftmailer send many emails in long-running connection and at some point SMTP server closes connection on timeout. this code helps if used before
$this->mailer->send()