Post by matheusalxandre » Wed Apr 19, 2017 3:04 am

Hi everyone,

I know that's a lot of topics about this, but I cant find one that solve my problem, I really search, but cant find a solution, if you can help me I will be very glad:

I'm trying to use SMTP on my website, but fail everytime I try to send a email.

The error -> Warning: fsockopen(): unable to connect to ssl:// (Connection timed out) in /home/vhosts/ on line 167

I'm using cloudflare on my website, to https.
Cludflare setup with gmail MX records, and CNAME with name = "mail" and value = (Gray option active)
I'm using gmail (using godady to .com, and configured on gmail on port 465 SSL as a aliass).
Gmail less secure apps disabled (also tried enabled)
Gmail two steps verification disabled (also tried enabled, and also tried use app password of the gmail on opencart SMTP Password )
Contacted the host, ports 25, 465, 587 are open, and I can use SMTP.

I'm using the following setup on opencart

Mail Protocol: SMTP
Mail Parameter: (also tried blank)
SMTP Hostname: ssl:// (also tried: , tls:// )
SMTP Username:
SMTP Password: My Gmail password
SMTP port: 465 (also tried: 25, 587)
Timeout: 5 (also tried: 7, 60, 200)

Already tried with outlook, zohoo, but the same problem.

I dont want to use Mail Protocol: MAIL, because this way, all emails go to SPAM folder.

Using the port 25 I get the error -> fsockopen(): SSL operation failed with code 1. OpenSSL Error messages: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol in /home/vhosts/ on line 167Warning: fsockopen(): Failed to enable crypto in /home/vhosts/ on line 167Warning: fsockopen():

My opencart version

Please Help Me :-[

PS english is not my native language, sorry.


Wed Apr 19, 2017 2:26 am

Post by maxigallo76 » Sat May 20, 2017 12:43 am

1. Login to your Opencart Admin Page and navigate to System > Settings > Edit > Mail
2. Once you have opened up the Mail Settings tab you should complete the form using the following data:
Mail Protocol should be set to SMTP
Mail Parameters is an optional field we will not be discussing. You can leave it blank for now.
SMTP Host should be set to “ssl://”
It is very important you include “ssl://” or your customers will receive errors when completing actions on your store that use the mail feature.
SMTP Username should be set to the account username for the Gmail account you would like to use. “
SMTP Password should be the corresponding password for your Google Account
SMTP Port should be “465"
This is also important as it’s a great feature of Google’s SMTP service. As it does not use port 20 it keeps your emails from being marked as spam.
SMTP Timeout you can leave set to the default of 5.
The alert email options can be turned on if you would like the store owner to be emailed every time an account is created or an order is processed. They are turned off by default and I suggest leaving them this way, especially if your store has a high volume of orders. These emails are sent to the email account specified from the General tab on the same settings page you are on now.
The additional alert email fields just specify other email address that you would like these alerts to be sent to if you did have them turned on.
That is all that must be completed from the Opencart admin. You can now hit save and move on to the next step.
3. Go to Gmail and login to the account that you used for your SMTP configuration in Step 2.
Once logged in, go to “"
Click continue. This will authenticate the next app or device that tries to access your Gmail Account within the next 10 minutes.
Now you must go to your Opencart store front end and register for a new account. When this is done Opencart will attempt to access your Gmail Account for SMTP and Google will Authenticate it.
You should be sent to a confirmation page that your account was created on your site, and an email should be sent to your email address you used to register your account, using your Google SMTP configuration.
That’s it! You’re all set up!
If you receive any errors, make sure you completed step 3 to have your store authenticated with Google, as well as used ssl:// before your hostname in the Opencart admin mail settings.



Fri May 19, 2017 10:43 pm
Who is online

Users browsing this forum: vitalyk, Yahoo [Bot] and 42 guests