Swift_TransportException: Expected response code 250 but got code "", with message ""

Posted: 13


Got following error during working on sending emails by queue. The reason was non-exists attachment file. 

If you got following error, try to send without attacment first

production.ERROR: Swift_TransportException: Expected response code 250 but got code "", with message ""
in /src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:383
Stack trace: #0 /src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(281):
Swift_Transport_AbstractSmtpTransport->_assertResponseCode('', Array) #1 /src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php(243):
Swift_Transport_AbstractSmtpTransport->executeCommand('HELO [127.0.0.1...', Array, Array)

 In my case the reason was that one docker container (fpm) generated attachment file into system temp directory, wich will not accesible by another container (supervisord)

Was solved by volume, volume_from

supervisord:
  ... other settings...
  volumes_from:
    - fpm

fpm:
  ... other settings...
  volumes:
    - /tmp

The other reasons I found in google is typically wrong smtp password, smtp limits.Hope this solution helps you.

If you find the post helpful you can share it


Ваше мнение:

Имя
   other with WEB
drcreazy © 2008-2012 all rights reserved