Forums / Bug Reports / [Done 1.3.8a] Could Not Connect to SMTP Host - 1.3.8 -includes/classes/class.smtp.php

[Done 1.3.8a] Could Not Connect to SMTP Host - 1.3.8 -includes/classes/class.smtp.php

Locked

Views: 9,691

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
10 Dec 2007, 10:37 AM
#1
pasi avatar

pasi

Zen Follower

Join Date:
Mar 2004
Location:
Finland
Posts:
435
Plugin Contributions:
1

[Done 1.3.8a] Could Not Connect to SMTP Host - 1.3.8 -includes/classes/class.smtp.php

There's a small coding typo (but still a show stopper) in includes/classes/class.smtp.php

After messing around with error reporting, I got this error:
Fatal error: Unsupported operand types in /home/pasi/public_html/koodaus/zencart/shop/includes/classes/class.smtp.php on line 118

The file reads the following in line 118:

//Added for Gmail support CER

if($this-Protocol != '') $host = $this->Protocol . "://" . $host;

As you can see... the $this-Protocol part misses a > ... adding it made it work

Working with Zen Cart since 2003 :: www.prr.fi
Author of the original Finnish language pack for Zen Cart since 2004

10 Dec 2007, 2:55 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: [Done 1.3.8a] Could Not Connect to SMTP Host - 1.3.8 -includes/classes/class.smtp.php

:oops:
Yes, that would be a bug ...

Thanks for the details.

To clarify, the fix is this:
/includes/classes/class.smtp.php on line 118
Add the > as shown:

//Added for Gmail support CER

if($this-[B]>[/B]Protocol != '') $host = $this->Protocol . "://" . $host;

NOTE: This issue is fixed in v1.3.8a ... announced here: http://www.zen-cart.com/forum/showthread.php?p=473780#post473780

.

.
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.

10 Dec 2007, 7:16 PM
#3
tinypack avatar

tinypack

New Zenner

Join Date:
Apr 2007
Location:
Spudville
Posts:
60
Plugin Contributions:
0

Re: [Done 1.3.8a] Could Not Connect to SMTP Host - 1.3.8 -includes/classes/class.smtp.php

I guess I don't understand exactly where the extra > goes?

I did a character by character comparison and found the line posted above had extra spaces? Is that the difference?

if($this-Protocol != '') $host = $this->Protocol."://".$host;
if($this-Protocol != '') $host = $this->Protocol . "://" . $host;

www.PrairieRoses.com
A Country Sensibility

10 Dec 2007, 8:24 PM
#4
tinypack avatar

tinypack

New Zenner

Join Date:
Apr 2007
Location:
Spudville
Posts:
60
Plugin Contributions:
0

Re: [Done 1.3.8a] Could Not Connect to SMTP Host - 1.3.8 -includes/classes/class.smtp.php

OK, corrected the line to read:

if($this->Protocol != '') $host = $this->Protocol . "://" . $host;

Did not solve the problem, especially when trying to complete an order using Paypal Express. Also, intermittently getting this error when updating an order in zen-cart.

Email Error: SMTP Error: Data not accepted.

www.PrairieRoses.com
A Country Sensibility

10 Dec 2007, 8:48 PM
#5
tinypack avatar

tinypack

New Zenner

Join Date:
Apr 2007
Location:
Spudville
Posts:
60
Plugin Contributions:
0

Re: [Done 1.3.8a] Could Not Connect to SMTP Host - 1.3.8 -includes/classes/class.smtp.php

Umm... didn't help for me.
Switched to PHP instead of SMTP in email settings and the problem appears solved. Emails send faster too.

:clap:

www.PrairieRoses.com
A Country Sensibility