Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Gmail Smtp Connection Problem Rate Topic   - - - - -

 
  • urbanp
  • Member
  • Members
  • Join Date: 23-Jun 14
  • 27 posts

Posted 07 November 2018 - 09:36 AM #1

Hello all,

 

I installed my Cs-Cart to my new domain and tried to connect my email via SMTP. I am using Google Apps Gmail service for my domain. However I failed to use it and every time I get same error. 

 

ErrorMessage could not be sent.

Mailer Error: SMTP connect() failed. https://github.com/P...Troubleshooting

 

What I tried up to now:

* I double checked every details on the email settings page, port, ssl, password, username etc. 

*I removed 2FA authentication on gmail and also I turned on access for less secured apps on gmail security settings

*I updated the phpmailer folder with the newest one. 5.2.26

 

I checked most web and could not find the exact working solution. All your help will be much appreciated. 

 

 

 

 



 
  • Flow
  • Super Duper and Amazingly Sexy Senior
  • Members
  • Join Date: 13-Oct 10
  • 2294 posts

Posted 07 November 2018 - 09:47 AM #2

Most probably your firewall is blocking the port. You have to open the port.


When life hands you lemons, bring on the Tequila baby!


 
  • urbanp
  • Member
  • Members
  • Join Date: 23-Jun 14
  • 27 posts

Posted 07 November 2018 - 09:48 AM #3

Hello, could you please be more specific ? Can I do it on Cpanel ? 

 

Most probably your firewall is blocking the port. You have to open the port.



 
  • soft-solid
  • Junior Member
  • Members
  • Join Date: 19-Apr 10
  • 801 posts

Posted 07 November 2018 - 09:54 AM #4

Hello urbanp

 

Please try version 5.2.9 (The latest version is 6.0.5 ! not  5.2.26) see https://github.com/PHPMailer/PHPMailer

I had the same problem and it solved me.

 

 

Best regards

Robert.


Team of SoftSolid
cs-cart.pl

 
  • urbanp
  • Member
  • Members
  • Join Date: 23-Jun 14
  • 27 posts

Posted 07 November 2018 - 10:39 AM #5

Hello urbanp

 

Please try version 5.2.9 (The latest version is 6.0.5 ! not  5.2.26) see https://github.com/PHPMailer/PHPMailer

I had the same problem and it solved me.

 

 

Best regards

Robert.

 

Hello you mean 5.2.19 ? because I don't think there is 5.2.9 version.



 
  • soft-solid
  • Junior Member
  • Members
  • Join Date: 19-Apr 10
  • 801 posts

Posted 07 November 2018 - 10:48 AM #6

Hello

 

Please try download newest version 6.0.5. And see if there will be an error.

 

Best regards

Robert.


Team of SoftSolid
cs-cart.pl

 
  • urbanp
  • Member
  • Members
  • Join Date: 23-Jun 14
  • 27 posts

Posted 07 November 2018 - 11:07 AM #7

Hello,

 

It did not worked.

Also there is significant change between v5 and v6. I don't think version 6 will work with current Cs-Cart ? 

I tried most versions of phpmailer but still same problem :/

 

Hello

 

Please try download newest version 6.0.5. And see if there will be an error.

 

Best regards

Robert.



 
  • soft-solid
  • Junior Member
  • Members
  • Join Date: 19-Apr 10
  • 801 posts

Posted 07 November 2018 - 11:50 AM #8

Hello.

 

Please try my package and write if it works for you.

 

Best regards

Robert.

Attached Files


Team of SoftSolid
cs-cart.pl

 
  • urbanp
  • Member
  • Members
  • Join Date: 23-Jun 14
  • 27 posts

Posted 07 November 2018 - 11:58 AM #9

Hello,

 

Your version is 5.2.9 (sorry I find it now) from Sep 26, 2014. I now uploaded this version and still getting same error. 

Thank you for your effort but I think the problem caused because of something else. In older versions of Cs-cart I did not experience it but now I am using latest version of Cs-cart, and experience this. 

 

ErrorMessage could not be sent.

Mailer Error: SMTP connect() failed.



 
  • Flow
  • Super Duper and Amazingly Sexy Senior
  • Members
  • Join Date: 13-Oct 10
  • 2294 posts

Posted 07 November 2018 - 02:05 PM #10

Hello, could you please be more specific ? Can I do it on Cpanel ? 

 

If you're using WHM and csf firewall, it's Home »Plugins »ConfigServer Security & Firewall

Then choose firewall configuration and add port 465 there. If you're unsure, just ask your host :)


When life hands you lemons, bring on the Tequila baby!


 
  • urbanp
  • Member
  • Members
  • Join Date: 23-Jun 14
  • 27 posts

Posted 07 November 2018 - 06:38 PM #11

If you're using WHM and csf firewall, it's Home »Plugins »ConfigServer Security & Firewall

Then choose firewall configuration and add port 465 there. If you're unsure, just ask your host :)

 

I talked with the hosting support, they port is running and it was opened already. Thank you for your answer anyway. 



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11338 posts

Posted 07 November 2018 - 07:17 PM #12

From the original error message, you shouldn't be specifying an SMTP host using an http protocol (drop the https:// part).  Make sure you're just using the hostname and let the system manage the protocol properly.  If you need to add a special port then do so using hostname:port type of syntax.  Generally the system will determine the protocol when it tries to open the port.  I.e. SMTP protocol  will tell it what it expects.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • urbanp
  • Member
  • Members
  • Join Date: 23-Jun 14
  • 27 posts

Posted 07 November 2018 - 07:29 PM #13

From the original error message, you shouldn't be specifying an SMTP host using an http protocol (drop the https:// part).  Make sure you're just using the hostname and let the system manage the protocol properly.  If you need to add a special port then do so using hostname:port type of syntax.  Generally the system will determine the protocol when it tries to open the port.  I.e. SMTP protocol  will tell it what it expects.

Hello, 

I use exact "smtp.gmail.com:465" in smtp host section.

SSL encryption with smtp authentication on. 



 
  • Flow
  • Super Duper and Amazingly Sexy Senior
  • Members
  • Join Date: 13-Oct 10
  • 2294 posts

Posted 07 November 2018 - 07:45 PM #14

Please make a file called something like mailtest.php with the following content, upload it to your domain, visit the file from your browser, and let us know what it says?

<?php
error_reporting(E_ALL ^ E_NOTICE);
ini_set("display_errors", "on");

$host = 'smtp.gmail.com';
$port = '465';
$tval ='30';

$test = fsockopen('ssl://' . $host, $port, $errno, $errstr, $tval); 
if ($test == true){
print("OK");}
else
{
print $test;
}
?>

It should say OK.


When life hands you lemons, bring on the Tequila baby!


 
  • urbanp
  • Member
  • Members
  • Join Date: 23-Jun 14
  • 27 posts

Posted 07 November 2018 - 07:48 PM #15

Please make a file called something like mailtest.php with the following content, upload it to your domain, visit the file from your browser, and let us know what it says?

<?php
error_reporting(E_ALL ^ E_NOTICE);
ini_set("display_errors", "on");

$host = 'smtp.gmail.com';
$port = '465';
$tval ='30';

$test = fsockopen('ssl://' . $host, $port, $errno, $errstr, $tval); 
if ($test == true){
print("OK");}
else
{
print $test;
}
?>

It should say OK.

Returns OK.



 
  • Flow
  • Super Duper and Amazingly Sexy Senior
  • Members
  • Join Date: 13-Oct 10
  • 2294 posts

Posted 08 November 2018 - 06:17 AM #16

Good. And you have the following settings?

 

smtp.gmail.com:465

Use Encrypted Connection: SSL

Use SMTP authentication: Checked


When life hands you lemons, bring on the Tequila baby!


 
  • urbanp
  • Member
  • Members
  • Join Date: 23-Jun 14
  • 27 posts

Posted 08 November 2018 - 07:49 AM #17

Good. And you have the following settings?

 

smtp.gmail.com:465

Use Encrypted Connection: SSL

Use SMTP authentication: Checked

All correct. I added a screenshot of the settings page.

https://unsee.cc/5d21ce60/