Post by hande » Wed Sep 29, 2010 2:48 am

I've got some error when some customer register on my test shop, but i assume i'll get same error every time OC tries to send some mail as configured on admin panel;
Warning: fsockopen() [function.fsockopen]: unable to connect to smtp.gmail.com:465 (Connection refused) in /home/content/xx/xxx/html/xxx/system/library/mail.php on line 157
Warning: Cannot modify header information - headers already sent by (output started at /home/content/xx/xxx/html/xxx/index.php:92) in /home/content/xx/xxx/html/xxx/system/engine/controller.php on line 27
Mail admin config;
STMP
smtp.gmail.com
user@blahblah.com
userpassword
smtp port - 465 (Tried to change smtp port from 465 to 587 with same result)

I'm using opencart 1.4.9.1 and extension "VAT/IVA number" http://www.opencart.com/index.php?route ... order=DESC

I didn't modified nothing on template or other code, at least, as far as I know/remember.

Changed php.ini on smtp config to localhost or smtp.gmail.com, but got same error.

Other Details;
On Godaddy hosting - Hosting - Grid - Deluxe - Linux.
And google apps (gmail) with pop activated on account (working via web and other mail clients).
Also got the same problem with 1.4.8 version with NIF/VAT module too.

Thanks in advance!
Last edited by hande on Fri Oct 01, 2010 2:36 am, edited 1 time in total.

@ Shop | Work | Blog | Photos | Wallpapers | Twitter


User avatar
New member

Posts

Joined
Tue Nov 17, 2009 5:57 am
Location - Barcelona / Spain

Post by hande » Thu Sep 30, 2010 11:12 pm

Any ideas?

Already took some time on;
http://forum.opencart.com/viewtopic.php?t=12845
But it changes from gmail to freehostia and that's not what I need.

If i make some phpinfo() i get this;
sendmail_from me@localhost.com
sendmail_path /usr/sbin/sendmail -t -i
serialize_precision 100
short_open_tag On
SMTP relay-hosting.secureserver.net
smtp_port 25
On my php.ini;
SMTP = relay-hosting.secureserver.net
I've got the same error even if I configure mail protocol on "mail" or "smtp". Maybe is some problem with configuration on my gmail account or server, but i don't get the point.

UPDATE; Made same test on another OC with 1.4.9.1, too. And this seems to work (algo godaddy hosting, and google apps -gmail- mail). phpinfo() shows same config on both servers.
So maybe is something that some module or myself changed on some PHP code. Let me check.

SOLUTION: After looking at code and domain config, just realized that problem could be on Google Apps configuration (mail), and now seems to work.
To let google apps send mails from opencart system I have to check SSL connection;
Google Apps -> Domain Settings -> Enable SSL

OpenCart -> Admin -> System -> Configuration -> Mail
Protocol -> Mail
SMTP Host: smtp.gmail.com
SMTP Username: user@domain.com
SMTP Password: userpassword
SMTP Port: 465

After changing that sending mails from opencart system worked.

Hope it could help someone.

@ Shop | Work | Blog | Photos | Wallpapers | Twitter


User avatar
New member

Posts

Joined
Tue Nov 17, 2009 5:57 am
Location - Barcelona / Spain
Who is online

Users browsing this forum: No registered users and 8 guests