Jump to content

Cubecart does not send mail when an order is placed


bos
 Share

Recommended Posts

(CC 6.0.12)

These are my admin-settings. Expected behaviour is that I get a mail whenever an order is placed ( = pending), but I never receive any mails.

Checking the Error Log in the admin-interface reveals nothing, and my mail-address is correct.

Tips?

 

cc_admin.png

Link to comment
Share on other sites

In admin, Store Settings, Advanced tab, make sure the Email settings are as you think they should be. If anything was changed, Save. Then click the TEST button.

A window will open showing the results of CubeCart trying to talk to the email server so designated to receive emails to send out.

Link to comment
Share on other sites

Then we know that your installation can email.

But, for some reason, the debug conversation is not getting captured. That is, the SMTPTest function uses PHP's Output Buffering functionality.

In admin, PHP Info, scroll to the Core table. Then look for the 'output_buffering' row. The default value is 4096.

If this says Off or has a zero value, then you will need to contact your hosting provider to get assistance at enabling this.

This is the only reason I can determine where the TEST would return "Test failed to execute." but with no error info (as if the Mailer had no error to report).

That sets us back to square-one to learn why you are not getting Pending Order emails.

The thing to check is the Admin: Order Received email template. There is a conversation in the forum about what to check. Search for nested braces.

Link to comment
Share on other sites

output_buffering is 4096, so no error there.

I checked the thread you referred to, and I was just about to investigate the Order Received-template. But, somehow, I'm unable to.

In the template list, I click the flag-icon next to "Admin: Order Received", expecting to see the code for this template. Instead, a template named "New Order" shows up (see second attachment).

No matter what I do in the Template-list, I cannot seem to bring up the Order Received-template. I tried FTP to the store, seeing if the template was accessible as a plain file somewhere, but I did not find it so I surmise the templates are stored in the database.

I'm pretty confused as to why I cannot view the correct template.

templates.png

newitem.png

Link to comment
Share on other sites

The Admin: Order Received is the name of the template.

The phrase New Order #{$DATA.cart_order_id} is content that the template will substitute with actual data. Also, a different language will have a different phrase. For example, a German template will have Neue Bestellung #{$DATA.cart_order_id}.

It is, however, just a tad confusing to see the content assigned to the Subject header (of the email) in the Breadcrumbs.

You will see the WYSIWYG content on the HTML Content and Plain Text Content tabs. On the HTML Content tab, the editor can be switched to Source mode to more easily check and make the edits.

The conversation linked to above discusses one instance in another template.

But the linked nesting issue is also found in Admin: Order Received, at five places (the first line, two in Billing, and two in Shipping) in both the HTML and Plain Text tabs.

I also want to stress that the problem of malformed email templates arise only after having edited the HTML Content - as it is the CKEditor that causes the malformation.

Link to comment
Share on other sites

I would ask that you submit a service ticket to your hosting provider to have them verify that PHP's Output Buffering is enabled.

I assert that the only way the TEST would not capture the conversation is if PHP's functions ob_start() and ob_get_contents() were not functioning.

 

Link to comment
Share on other sites

I will contact my hosting provider tomorrow and see what it looks like at their end.

Now, for the sake of testing; I wiped out the "Admin: Order Received"-template, leaving only a short line of text, like "Someone's placed an order. Track it here:  [...]", both for HTML version and Plain text version. This is basically the only thing I want; a mail telling me an order has been placed. An order summary per mail is not that useful for me, since I still need to login to the store to process the order.

But still, despite cleaning up the template; no mail arrives.

Link to comment
Share on other sites

Hmm... Frustrating.

There is one final test I would like for you to do. See: https://forums.cubecart.com/topic/51550-how-to-create-the-error-log/

Make a test. If there aren't any clues in the error_log file, then we need to either:

 

Link to comment
Share on other sites

I followed the thread of how to create an error-log, cleaned my old error-logs in the Admin-interface and ran the mail()-test once again.

Result: "TEST failed to execute", clean logs (that is, no entries in the error-log), test-mail arrives to my inbox.

 

Link to comment
Share on other sites

Ok, excellent.

Please contact your hosting provider to advise them that:

"The TCP wrapper for CURL is not configured."

Also:

"Folders in PHP's "include" path for my site are being denied access due to 'open_basedir restrictions'. Please help with adjusting PHP's "include" path, or include these folders as "allowed paths".

Give your hosting provider's tech support (at least the location of) this error file.

Link to comment
Share on other sites

I contacted support and they told me that "You are trying to access files that belongs to a template engine (Smarty) that's not installed on our servers. We cannot change the open_basedir-rules because our users are supposed to only read and write from their respective folders".

And:

"Can you please elaborate what they [you, bsmither] mean with 'The TCP wrapper for CURL is not configured' ?".

 

Link to comment
Share on other sites

Your host cannot change the open_basedir rules. Ok, fine. But they (or maybe you have the ability in your hosting control panel?) are able to adjust the PHP.INI setting to remove these folders from PHP's 'include_path'.

PHP's error message, "Unable to find the wrapper "tcp" - did you forget to enable it when you configured PHP?"

There is this:
https://forums.cubecart.com/topic/51327-resolved-blank-store-front-after-upgrade-to-6011/

 

Link to comment
Share on other sites

I checked that topic, to no avail. That user had problems with the Kurotu skin (which I use as well) so just for the sake of testing I tried replacing it with the default one, but the error remains; no mails at all are sent. This is getting a bit frustrating, because the customers don't get an order confirmation mail either.

Checking the error log, I'm a bit confused. This line:

[23-Sep-2016 21:56:39 Europe/Stockholm] PHP Warning:  file_exists() [<a href='http://docs.php.net/manual/en/function.file-exists.php'>function.file-exists.php</a>]: open_basedir restriction in effect. File(/usr/share/pear/PHPMailer.php) is not within the allowed path(s): (/storage/content/:/tmp/:/usr/share/pear/:/usr/share/php/) in /storage/content/07/134407/store.ribit.se/public_html/classes/autoloader.class.php on line 92


If i interpret it word by word, what I'm reading is that /usr/share/pear/PHPMailer.php is not within the paths in the parenthesis, but checking the parenthesis I clearly see /usr/share/pear/ there, so what exactly is this error message telling me?

Is CC trying to invoke the /usr/share-file instead of the one found under classes/phpMailer?

Put another way, which of these two are supposed to be invoked from CC?

Link to comment
Share on other sites

In autoloader.class.php, the autoload() function is trying to find the PHPMailer.php file.

I think that is not correct, as the proper sequence, as I see it, is to find and load the /classes/mailer.class.php file.

If I am correct, there is code somewhere that is wanting to find and load the PHPMailer class. That code could be a plugin written for an earlier version of CC5 and has not been updated to CC6.

Can we have a list of third-party modules that are installed?

Ideally, if we can get trace of this warning, we can figure out what is calling the Mailer incorrectly.

Link to comment
Share on other sites

There are four plugins installed, but only three of them are active:

All In One Shopping (... module that can calculate shipping based on the weight...) v1.0.8

Facebook (comments/like) v1.0.0

Paypal (payment gateway, DISABLED) v1.0.1

Print Order Form v1.0.1

 

Link to comment
Share on other sites

The POF uses the Mailer - in this case, correctly.

Still have no answer about the test failing (output buffering), but still the test email gets sent.

I would like to work with you to troubleshoot this issue offline. If you want, send me a PM with your email address.

Or, you can get a month's support from CubeCart and they will dig into it and find out why.

Link to comment
Share on other sites

Hi,

We have got the same problem in that we are also no longer getting emails to notifify us that an order has been placed. We are also getting the same message as bos on testing the email. The output buffering is 4096 as expected but we also get New order and the language set as german(!) when looking at the Admin: order received email template

Would be very interested to hear what the solution us and also why this has started happening. 

Thanks

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.

 Share

×
×
  • Create New...