Forums / General Questions / Email Error: SMTP Error: Could not connect to SMTP host.

Email Error: SMTP Error: Could not connect to SMTP host.

Locked

Views: 4,505

Results 1 to 18 of 18
This thread is locked. New replies are disabled.
6 Jun 2010, 8:22 PM
#1
rubear avatar

rubear

New Zenner

Join Date:
May 2007
Posts:
34
Plugin Contributions:
0

Email Error: SMTP Error: Could not connect to SMTP host.

Hello. I'm currently upgrading my site to v3.1.9b. I've followed the upgrade instructions closely, and I'm nearly there... I've got v3.1.9b working in a test area, using a test database which is a copy of my regular database. Everything looks ok, but the email functionality does not work. Examples:

  1. When I try to make an order on the new shop, I can pay for the item, but then it fails when trying to email a confirmation. I get a simple white page with the message: Email Error: SMTP Error: Could not connect to SMTP host. However, the order is actually placed in the system, and payment is processed.

  2. When trying to email a customer using the "Send email" screen in the admin area, I get the same error (Email Error: SMTP Error: Could not connect to SMTP host.) when I click on the send button.

  3. When trying to send an email to Customer Services as a user from the site, I click on send, but DO NOT get an error message - the site simply informs me that my message has been sent. The email does not, however, arrive.

I have the Email Archive Manager installed, and that logs that the emails have been sent (despite not actually sending).

I have also tested sending emails from my regular pre-upgrade version of the shop (v 1.3.8), and that all works fine. When I compare the options in the Admin > Confirguation > Email Options screen, there are no differences between the 2.

Finally, I have also compared the files in my 2 versions of the site, and can't see any missing files. I may of course have missed a line of code when copying my code changes to the new version, but it's rather like trying to find a needle in a haystack!

Is anyone please able to help? I've been looking at this all day, and can't work out what's wrong!

Many thanks
Ru

6 Jun 2010, 10:55 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Email Error: SMTP Error: Could not connect to SMTP host.

What are your settings for

admin > config > email options??

E-Mail Transport Method 
E-Mail Linefeeds
Use MIME HTML When Sending Emails 
Send E-Mails
Email Archiving Active?
E-Mail Friendly-Errors
Email Address (Displayed to Contact you) 
Email Address (sent FROM) 
Emails must send from known domain? 
Email Admin Format?
Send Copy of Order Confirmation Emails To 
Send Copy of Create Account Emails To - Status
Send Copy of Create Account Emails To 
Send Copy of Tell a Friend Emails To - Status 	
Send Copy of Tell a Friend Emails To 	
Send Copy of Customer GV Send Emails To - Status 
Send Copy of Customer GV Send Emails To
Send Copy of Admin GV Mail Emails To - Status 
Send Copy of Customer Admin GV Mail Emails To 	 
Send Copy of Admin Discount Coupon Mail Emails To - Status 
Send Copy of Customer Admin Discount Coupon Mail Emails To 	
Send Copy of Admin Orders Status Emails To - Status 	
Send Copy of Admin Orders Status Emails To 	
Send Notice of Pending Reviews Emails To - Status 
Send Notice of Pending Reviews Emails To 
Set "Contact Us" Email Dropdown List 
Allow Guest To Tell A Friend 
Contact Us - Show Store Name and Address 
Send Low Stock Emails 	
Send Low Stock Emails To 
Display "Newsletter Unsubscribe" Link? 
Audience-Select Count Display
SMTP Email Account Mailbox 	YourEmailAccountNameHere 
SMTP Email Account Password 	
SMTP Email Mail Host 	mail.EnterYourDomain.com
SMTP Email Mail Server Port 
Convert currencies for Text emails

Zen-Venom Get Bitten

8 Jun 2010, 4:06 PM
#3
rubear avatar

rubear

New Zenner

Join Date:
May 2007
Posts:
34
Plugin Contributions:
0

Re: Email Error: SMTP Error: Could not connect to SMTP host.

E-Mail Transport Method smtpauth
E-Mail Linefeeds LF
Use MIME HTML When Sending Emails true
Send E-Mails true
Email Archiving Active? true
E-Mail Friendly-Errors true
Email Address (Displayed to Contact you) xxxxxxxxxxx
Email Address (sent FROM) xxxxxxxxxxxxxxxx
Emails must send from known domain? No
Email Admin Format? HTML
Send Copy of Order Confirmation Emails To xxxxxxxxx

Send Copy of Create Account Emails To - Status 0
Send Copy of Create Account Emails To xxxxxxxxxxx
Send Copy of Tell a Friend Emails To - Status 0
Send Copy of Tell a Friend Emails To xxxxxxxxxxx
Send Copy of Customer GV Send Emails To - Status 0
Send Copy of Customer GV Send Emails To xxxxxxxxxxxxx
Send Copy of Admin GV Mail Emails To - Status 0
Send Copy of Customer Admin GV Mail Emails To xxxxxxxxxxx
Send Copy of Admin Discount Coupon Mail Emails To - Status 0
Send Copy of Customer Admin Discount Coupon Mail Emails To xxxxxxxxxxxx
Send Copy of Admin Orders Status Emails To - Status 0
Send Copy of Admin Orders Status Emails To xxxxxxxxxxxx
Send Notice of Pending Reviews Emails To - Status 0
Send Notice of Pending Reviews Emails To xxxxxxxxxxxx
Set "Contact Us" Email Dropdown List Customer Services <xxxxxxxxxxx>, Technical Support <xxxxxxxxxxxxxxx>
Allow Guest To Tell A Friend false
Contact Us - Show Store Name and Address 1
Send Low Stock Emails 0
Send Low Stock Emails To xxxxxxxxxxxxxx
Display "Newsletter Unsubscribe" Link? true

SMTP Email Mail Server Port 587
Convert currencies for Text emails £,£:€,€
Send Notice of Newsletter-only Subscriptions To - Status 0
Send Notice of Newsletter-only Subscriptions To
Newsletter Test Group Email

Note: xxxxxxxxxxx = fully functional email address

Many thanks

8 Jun 2010, 5:12 PM
#4
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: Email Error: SMTP Error: Could not connect to SMTP host.

and this part is filled in with valid information

SMTP Email Account Mailbox YourEmailAccountNameHere
SMTP Email Account Password
SMTP Email Mail Host mail.EnterYourDomain.com
SMTP Email Mail Server Port

Zen cart PCI compliant Hosting

8 Jun 2010, 9:05 PM
#5
rubear avatar

rubear

New Zenner

Join Date:
May 2007
Posts:
34
Plugin Contributions:
0

Re: Email Error: SMTP Error: Could not connect to SMTP host.

Yes, it is correct information. It's exactly the same info that we have on our current live installation (v1.3.8). It's something on our v1.3.9b pages that doesn't work with email.

As I said in my post above, it's possible that I copied any code modifications over incorrectly, but I was very meticulous (taking nearly a whole day just to check the coding and transfer any mods). I suspect that the Email Archive Manager might be to blame, but I've re-checked the code for that, and can't spot any code errors.

I'm really stumped by this one, and would appreciate any help that anyone can offer.

Many thanks

8 Jun 2010, 9:08 PM
#6
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: Email Error: SMTP Error: Could not connect to SMTP host.

try installing a completely core fresh install of 1.3.9D in a subfolder and try the email settings there

this will give you a clean comparison

Zen cart PCI compliant Hosting

8 Jul 2010, 12:43 PM
#7
shoesocks_com avatar

shoesocks_com

New Zenner

Join Date:
Dec 2009
Posts:
21
Plugin Contributions:
0

Re: Email Error: SMTP Error: Could not connect to SMTP host.

I have version 1.3.9D and am having the exact same issue as described above. The email configuration from my email host has not changed and none of the real-time logs are showing these emails to be blocked. What could be the problem?

8 Jul 2010, 6:03 PM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Email Error: SMTP Error: Could not connect to SMTP host.

This problem just "suddenly" started?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

8 Jul 2010, 6:51 PM
#9
shoesocks_com avatar

shoesocks_com

New Zenner

Join Date:
Dec 2009
Posts:
21
Plugin Contributions:
0

Re: Email Error: SMTP Error: Could not connect to SMTP host.

It must have started since I upgraded from 1.3.8 about a week ago.

8 Jul 2010, 7:16 PM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Email Error: SMTP Error: Could not connect to SMTP host.

What are your settings in Admin->Configuration->Email Options ? (without password)

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

8 Jul 2010, 7:32 PM
#11
shoesocks_com avatar

shoesocks_com

New Zenner

Join Date:
Dec 2009
Posts:
21
Plugin Contributions:
0

Re: Email Error: SMTP Error: Could not connect to SMTP host.

E-Mail Transport Method smtpauth
E-Mail Linefeeds LF
Use MIME HTML When Sending Emails true
Send E-Mails true
Email Archiving Active? true
E-Mail Friendly-Errors true
Email Address (Displayed to Contact you) [email protected]
Email Address (sent FROM) [email protected]
Emails must send from known domain? Yes
Email Admin Format? TEXT
Send Copy of Order Confirmation Emails To [email protected]
Send Copy of Create Account Emails To - Status 1
Send Copy of Create Account Emails To [email protected] Info
Send Copy of Tell a Friend Emails To - Status 0
Send Copy of Tell a Friend Emails To [email protected]
Send Copy of Customer GV Send Emails To - Status 0
Send Copy of Customer GV Send Emails To [email protected]
Send Copy of Admin GV Mail Emails To - Status 0
Send Copy of Customer Admin GV Mail Emails To [email protected]
Send Copy of Admin Discount Coupon Mail Emails To - Status 0
Send Copy of Customer Admin Discount Coupon Mail Emails To [email protected]
Send Copy of Admin Orders Status Emails To - Status 0
Send Copy of Admin Orders Status Emails To [email protected]
Send Notice of Pending Reviews Emails To - Status 0
Send Notice of Pending Reviews Emails To [email protected]
Set "Contact Us" Email Dropdown List
Allow Guest To Tell A Friend false Info
Contact Us - Show Store Name and Address 1
Send Low Stock Emails 0
Send Low Stock Emails To [email protected]
Display "Newsletter Unsubscribe" Link? true
Audience-Select Count Display true
SMTP Email Account Mailbox xxx
SMTP Email Account Password *******
SMTP Email Mail Host smtp.xxx.net
SMTP Email Mail Server Port 587
Convert currencies for Text emails £,£:€,€ Info

8 Jul 2010, 7:56 PM
#12
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Email Error: SMTP Error: Could not connect to SMTP host.

What if you use port 25 instead of 587?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

8 Jul 2010, 8:43 PM
#13
shoesocks_com avatar

shoesocks_com

New Zenner

Join Date:
Dec 2009
Posts:
21
Plugin Contributions:
0

Re: Email Error: SMTP Error: Could not connect to SMTP host.

the same thing happens

8 Jul 2010, 10:07 PM
#14
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Email Error: SMTP Error: Could not connect to SMTP host.

What happens if you try "SMTP" instead of "SMTPAUTH"?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

8 Jul 2010, 11:34 PM
#15
shoesocks_com avatar

shoesocks_com

New Zenner

Join Date:
Dec 2009
Posts:
21
Plugin Contributions:
0

Re: Email Error: SMTP Error: Could not connect to SMTP host.

The email failed to send.

9 Jul 2010, 2:14 AM
#16
shoesocks_com avatar

shoesocks_com

New Zenner

Join Date:
Dec 2009
Posts:
21
Plugin Contributions:
0

Re: Email Error: SMTP Error: Could not connect to SMTP host.

FYI, I tried to do this with a gmail account and with two other accounts I have on my email host. All of them fail to connect to the SMTP server. Is it possible the functions_email.php file is corrupt or some other file? It's as almost if it doesn't try to connect to the server. For example, when I tried port 25, it thinks for a few seconds before getting the error as if it is attempting to connect. With port 587, it just give the error after hitting the send button. I need this functionality and don't know what to do at this point.

9 Jul 2010, 3:26 AM
#17
shoesocks_com avatar

shoesocks_com

New Zenner

Join Date:
Dec 2009
Posts:
21
Plugin Contributions:
0

Re: Email Error: SMTP Error: Could not connect to SMTP host.

I found the solution with the help of my hosting company. According to them, there is a prevention, a security rule that prevents scripts form making direct SMTP socket connections on the server. Supposedly it did not change since my upgrade. They put an exception for my domain/userID. Port 587 didn't work but 25 did.

9 Jul 2010, 4:29 AM
#18
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Email Error: SMTP Error: Could not connect to SMTP host.

Thanks for confirming that the problem was a hosting configuration issue.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.