Jump to content

Fixing outbound email problem.


Recommended Posts

It appears that for some time now, notification emails have not been going out from my Prestashop 1.4.5.1 system. I'm pretty sure the problem is in my email setup and I'm trying to correct it, but now whenever I try to send out a test message from the SMTP config page, I get the following error:

 

Error: please check your configuration

There was a problem reading line 2 of an SMTP response. The response so far was:

[-ERR Unknown command. ]. It appears the connection has died without saying goodbye to us! Too many emails in one go perhaps? (fsockopen: #0

 

I'm wondering if Presta now has a cache of emails somewhere, all waiting to go out, and that this cache is perhaps causing a choke of some kind. Can anybody suggest how I can dig deeper?

 

Jefficus

Link to comment
Share on other sites

Check your email config under preferences should be set as follows. (I use .com change to .net if necessary)

Below is my setup and works just fine never an issue.

 

My Domain Name: pop.myprovider.com

 

SMTP Server: smtp.myprovider.com

 

SMTP User; [email protected]

 

SMTP Password: The password you use to access your mail account

 

Encryption: none

 

Port: 0

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

Another possible cause is that the default socket timeout setting used by Swift is too low in some cases, especially for any host that has a pause before the HELO greeting as an antispam measure.  In the file "tools/swift/Swift/Connection/SMTP.php" around line 246 is this code:

 

stream_set_timeout($this->handle, $this->timeout);

 

The default timeout is 5 which can be too low.  I am still trying to sort out where that value is getting set but the work around is to hardcode the timeout to something larger (10 worked in my case).

 

Cheers

  • Like 1
Link to comment
Share on other sites

Found the culprits. In classes/Mail.php there are two lines with a poor choice of a timeout value (should be a configuration variable):

 

line 169: $connection->setTimeout(4);

 

line 292: $smtp->setTimeout(5);

 

So test mails have to finish the initial connect (and all other requests) within 5 seconds, store messages have only 4 seconds for each response. If that is not enough, you will need to hardcode a longer timeout.

 

Cheers

  • Like 3
Link to comment
Share on other sites

  • 1 year later...

I originally replied that adjusting the time out settings fixed the problem.  It mysteriously worked once.  Back to square one.  In my case, I have a sneaking suspicion that it has something to do with Bluehost and the way they handle using external email on their servers.  I have changed my email routing and am pointing the mx record to my external mail server.  Fingers are crossed.

Edited by electrokid (see edit history)
Link to comment
Share on other sites

  • 2 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...