Jump to content

No Customer or Admin Emails Being Sent


Daamon

Recommended Posts

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 = Processing

Don'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!

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

@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...

Gmail_Settings.jpg

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by Daamon
typos
Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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 by Daamon
clarity of date received
Link to comment
Share on other sites

@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 by Daamon
Added "Also..." at end
Link to comment
Share on other sites

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).

Link to comment
Share on other sites

Hi bsmither.

Yes, the PHP Info 'sendmail_path' row has this entry: /usr/sbin/sendmail -t -i

Re: 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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...