chum63 Posted February 14, 2013 Share Posted February 14, 2013 My store has been using the mail on the server and send email, but they always end up in peoples SPAM folder and I have tried everything - google are investigating for me, but I thought in the meantime I would set up my cart to use the remote smtp gmail server to get around this for now. I have the following setting: smtp.gmail.com 465 Port SSL set on User name - my email address and password. All fine and these setting work fine on other products. But in cubecart no emails ar sent. As far as I am aware all the ports are open to be used. Any suggestions or at least someone saying they have this working on their server would be very encouraging. Thanks in advance Server and software info: CubeCart Version 5.1.5 PHP Version 5.3.18 MySQL Version 50096 Image folder size 112.6 MB Download folder size 0 Bytes Max. Upload filesize 105M Browser user-agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17 Server Software Apache/2.2.23 (Unix) mod_ssl/2.2.23 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 14, 2013 Share Posted February 14, 2013 CubeCart uses the (rebooted) PHPMailer utility. PHPMailer is fully capable of communicating with smtp.gmail.com using the protocols required by Google. Those requirements are: Gmail SMTP server address: smtp.gmail.com Gmail SMTP user name: Your full Gmail address (e.g. [email protected]) Gmail SMTP password: Your Gmail password Gmail SMTP port: 465 with SSL Gmail SMTP port: 587 with TLS Here is what may be the problem: CubeCart does not tell PHPMailer to enable the SMTP Secure setting, using SSL or TLS. Thus, Google is probably actively refusing the connection. In the file /classes/mailer.class.php, find near line 39: $this->Port = $GLOBALS['config']->get('config', 'email_smtp_port'); After that line, add the following on a new line: switch($this->Port){case 465:$this->SMTPSecure = 'ssl';break;case 587:$this->SMTPSecure = 'tls';} I don't know if this is sufficient. I haven't tried it. Try both ports. Let us know. (An old posting suggested this: Use tls://smtp.gmail.com for the server name.) Quote Link to comment Share on other sites More sharing options...
chum63 Posted February 15, 2013 Author Share Posted February 15, 2013 Great - thanks for the information - I will give it a try and get back with results. Cheers Quote Link to comment Share on other sites More sharing options...
chum63 Posted February 15, 2013 Author Share Posted February 15, 2013 Hi - just wanted to confirm that I added the switch statement to line 40 in my mailer.class.php and set up cubecart to use port 465 for SSL it works a treat! Thank you so much for the clear instructions. I assume I will have to keep changing on every upgrade? Thank you! Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 15, 2013 Share Posted February 15, 2013 I submitted a bug report to add this as a setting in the Store Settings, email settings group. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.