Daamon Posted October 30, 2015 Share Posted October 30, 2015 Hi,This is my first post to this forum, and my first venture into CubeCart - I've sort of fallen into a volunteer admin / tech support role for a not-for-profit organisation using CubeCart v6.0.8 for its shop.My problem: No emails of any kind are being sent to customers nor shop admin and, despite a lot of Googling and reading through existing posts, I can't figure out why.Scenario: A customer places an order for a product and pays for it.Expected / required emails:Customer / Shop Admin(s): An email confirming their order (line by line of items ordered) and confirmation that payment has been made. I see in Admin Control Panel -> File Manager -> Email Templates that there are (I presume) standard templates covering this.My Shop Settings & Config:Store Settings - > Administrators:- Both accounts have "Receive order notifications?" TRUE (ticked) and have a valid email address saved.Store Settings - > Features tab:Order status for admin email notifications = ProcessingDon't check skipped order processing email = FALSE (unticked)Store Settings - > Advanced tab:- Email settings: SMTP with SSL / valid and correct Gmail email address / SMTP host = smtp.gmail.com / SMTP port = 465 / correct username and password entered (Gmail)Note: I've tried SMTP (no SSL) and used port = 25 and blank. I've tried port = 587 (for TSL) and tried SMTP with and without SSL. PHP mail() function doesn't work.Help... Let me know if there's anything else you need...Thanks! Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 30, 2015 Share Posted October 30, 2015 Welcome Daamon! Glad to see you made it to the forums.If you are using GMail as your email SMTP mail server, you need to access your GMail account control panel and enter a setting that gives your GMail account permission to receive emails from an external source (I don't recall the steps, but it should be fairly obvious, especially after reading any help pages about doing that).In Store Settings, Advanced tab, after entering the SMTP with SSL and the Authorization credentials, and Saving, click the TEST button. There will be a popup window of the dialog CubeCart had with GMail.https://support.google.com/mail/answer/78775?hl=en Quote Link to comment Share on other sites More sharing options...
Daamon Posted October 30, 2015 Author Share Posted October 30, 2015 Hi. Thanks for replying, much appreciated.I've done some digging around - initially my Google email account settings, but couldn't see an obvious reference to allowing SMTP from an external server so did some Googling and it looks like free Google accounts can't set this, rather subscribers to Google Apps can do so. Does that sound right to you or can free Google emails use CubeCart?Thanks. Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 30, 2015 Share Posted October 30, 2015 I think this is the process:Login to the web console of your GMail account. In the upper right, click the gear icon and select Settings.On the Forwarding and POP/IMAP tab, POP Download section, click Learn More.Work through the wizard, selecting Other to learn what the settings are. Quote Link to comment Share on other sites More sharing options...
Daamon Posted October 30, 2015 Author Share Posted October 30, 2015 Thank you. I did look at that from the link you posted when you first replied but didn't (still don't) understand how POP / IMAP relates to SMTP, so didn't try it out (that's more research for me...)I'll try those and see how I go. I'll report back. Thanks. Quote Link to comment Share on other sites More sharing options...
Daamon Posted October 31, 2015 Author Share Posted October 31, 2015 @bsmither: I've gone into Gmail settings and enabled both POP and IMAP - I think the latter was already enabled while I was having the CubeCart issues described. See attached JPG.The "Learn More" link in Gmail settings eventually leads you through the same information as the URL you originally provided - which is, in turn, basically the same as the set up info I originally provided. i.e. it's saying "Use this SMTP host; these settings etc." which I've checked and all my Settings in CubeCart Advanced are correct.The "Test (After Save)" using SMTP with SSL port 465 or 567 (and I saved) results in: SMTP -> ERROR: Failed to connect to server: Connection timed out (110)SMTP connect() failed....as does SMTP no SSL port blank / 25.I'm going to try toTelnet in (as that's suggested on the Gmail support) but not sure that's going to provide any info... We'll see... Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 31, 2015 Share Posted October 31, 2015 Be sure to use port 587 in your tests (not 567 - perhaps a typo?). Quote Link to comment Share on other sites More sharing options...
Daamon Posted October 31, 2015 Author Share Posted October 31, 2015 An error on my part. But retried with the same result.Every user-editable field I've made sure a) it's spelt right b ) there's no spaces hidden at the end. Same result.Proxy is ser to No. Could it be my firewall? I use Comodo. Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 31, 2015 Share Posted October 31, 2015 It will not be the firewall of your personal workstation. (Unless it is the case where you have PHP, a web server, and a database installed locally.) It is PHP that is wanting to make a connection to smtp.gmail.com - not your browser.If a connection to smtp.gmail.com is being blocked, it will be caused by your hosting provider. Quote Link to comment Share on other sites More sharing options...
Daamon Posted October 31, 2015 Author Share Posted October 31, 2015 (edited) Thanks. You say "If a connection to smtp.gmail.com is being blocked, it will be caused by your hosting provider" - as in where CubeCart is hosted I presume? What would I need to ask for to get it unblocked? Any technical settings to quote to them? Edited October 31, 2015 by Daamon typos Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 31, 2015 Share Posted October 31, 2015 Yes, where and with whom you have your CubeCart installation hosted.Your hosting provider should be savvy about making SMTP connections to outside servers, using any and all of ports 25 (normal, but normally blocked), 465 (SSL), and 587 (TLS). Quote Link to comment Share on other sites More sharing options...
Daamon Posted October 31, 2015 Author Share Posted October 31, 2015 (edited) Yes, where and with whom you have your CubeCart installation hosted.Your hosting provider should be savvy about making SMTP connections to outside servers, using any and all of ports 25 (normal, but normally blocked), 465 (SSL), and 587 (TLS).Thanks. Strangely, it looks like some test emails did get through a few days ago but only 5 on the same day and all within a few minutes of each other. Attached .txt is the full version of one of the emails - any clues there? Host is ns1.aussiednsserver.com right?email_success.txt Edited October 31, 2015 by Daamon clarity of date received Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 31, 2015 Share Posted October 31, 2015 I disagree that the domain ns1.aussiednsserver.com is proper, but I'm not 100%. This address is a Name Server. Something strange is in play. Quote Link to comment Share on other sites More sharing options...
Daamon Posted October 31, 2015 Author Share Posted October 31, 2015 (edited) PHP Info: PHP Version 5.3.27 - Linux ns1.aussiednsserver.comThanks for all your help. I've got something to look into now... Edited October 31, 2015 by Daamon PHP Info added Quote Link to comment Share on other sites More sharing options...
Daamon Posted November 2, 2015 Author Share Posted November 2, 2015 (edited) @bsmither: An interesting development... In CC Admin -> Store Settings -> Advanced I set the Sending Method to "PHP mail() function" / port 465 and kept all other entries the same. The "Test" function appears to fail with the message "Test failed to execute", BUT... I do get an email received in my chosen destination email address, albeit in the Junk folder (that's the next investigation). Same result for ports 587, 25 and blank.So, does this prove that my host isn't blocking the emails and, further, why is the PHP mail function working and not SMTP with or without SSL?In parallel to this, I've been using cPanel to log into what I believe is the host server - are you familiar with cPanel and what it can access? I ask as I'm not familiar with this back-end stuff and am going by descriptions and what little I know / understand. I can't see anything blatantly for "Here's where you allow authentication for SMTP" have accessed cPanel -> Mail -> Email Authenricaiton and MX Entry and entered gmail.com and smtp.gmail.com into MX entries and also into an enabled SPF setting...Also, I presume that this thread's suggestion of "insert switch($this->Port){case 465:$this->SMTPSecure = 'ssl';break;case 587:$this->SMTPSecure = 'tls';}" no longer applies as I have CC v6.0.8 - or does it? Edited November 2, 2015 by Daamon Added "Also..." at end Quote Link to comment Share on other sites More sharing options...
bsmither Posted November 3, 2015 Share Posted November 3, 2015 The "PHP mail() function" is an interesting discovery. Honestly, I have not traced out the code when the Mailer class is told to use that. My initial impression is that the (third-party) utility, phpMailer, that CubeCart uses can make a connection with the operating system's installed mailer feature (exim, postfix, qmail, sendmail, etc) via PHP, but the nuts and bolts of how that is accomplished I have yet to discern.I can see where a Mailer->Send() would cause an email to get sent, but the perceived result would be equivalent to a false response (I'm reminded of the movie "Dark Star"). That false bubbles back to cause the answer to be "Test failed to execute," but that phrase is misleading.In admin, PHP Info, scroll to the Core table and look for the 'sendmail_path' row. If there is a path/executable listed there, then your account has permission to use the PHP mail() function. Now, if your host is allowing you to using the operating system's installed mailer, that still gives no clue as to whether they are blocking any other means of sending emails. That is a conversation to be had with the host tech support.CC608's "TEST Email" function is the same as that thread's instructions for earlier versions of CC5/6.I have no answer for the questions regarding cPanel's settings for your MX record and SPF setting (I know what those are, but I do not know how cPanel manages them). Quote Link to comment Share on other sites More sharing options...
Daamon Posted November 6, 2015 Author Share Posted November 6, 2015 Hi bsmither.Yes, the PHP Info 'sendmail_path' row has this entry: /usr/sbin/sendmail -t -iRe: cPanel - OK, fair enough.Do you have any comment on: Also, I presume that this thread's suggestion of "insert switch($this->Port){case 465:$this->SMTPSecure = 'ssl';break;case 587:$this->SMTPSecure = 'tls';}" no longer applies as I have CC v6.0.8 - or does it? Quote Link to comment Share on other sites More sharing options...
bsmither Posted November 6, 2015 Share Posted November 6, 2015 The PHPMailer (third-party) library has been updated in a recent version of CC6. So, when giving a specific port number, PHPMailer does, in fact now, know what to do with it. That thread does not apply to CC608. Quote Link to comment Share on other sites More sharing options...
Daamon Posted November 6, 2015 Author Share Posted November 6, 2015 (edited) Cheers. I suspected as much, but thought I'd check. And thank you for all your prompt and detailed help - very much appreciated. Edited November 6, 2015 by Daamon Thank you! 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.