Jump to content

Order emails


Wairds

Recommended Posts

When an order is placed three emails are generated. The customer receives a 'Thank you for your order' and an Order Confirmation and the shop owner receives a New Order notification. 

It is an intermittent problem but with increasing frequency these emails are sitting in the email log with an 'x' against them. When I press the Resend they are sent without a problem.

I have contacted my hosting company and they cant find any trace. Can somebody advise where I could look to diagnose the problem?

 

Many thanks.

Link to comment
Share on other sites

Please experiment with these edits (line numbers refer to CC6113):

In the admin skin template statistics.emaillog.php

Find near line 30:

<td align="center">{if $log.result==1}<i class="fa fa-check" title="{$LANG.common.yes}"></i>{else}<i class="fa fa-times" title="{$LANG.common.no}"></i>{/if}</td>

Change to:

<td align="center">{if $log.result==1}<i class="fa fa-check" title="{$LANG.common.yes}"></i>{else}<i class="fa fa-times" title="{$log.fail_reason}"></i>{/if}</td>

Using an external database utility such as phpMyAdmin, make the following change to CubeCart's database:

ALTER TABLE `CubeCart_email_log` ADD COLUMN `fail_reason` TEXT;
(If your database uses a table prefix, be sure to include it in the name of the table.)
In /classes/mailer.class.php, find near line 215:

			$email_data = array(
				'subject' => $this->Subject,
				'content_html' => $this->_html,
				'content_text' => $this->_text,
				'to' => $email,
				'from' => $this->Sender,
				'result' => $result,
				'email_content_id' => $this->_email_content_id
			);

On a new blank line after that, add:

if ($result === false) $email_data['fail_reason'] = htmlentities($this->ErrorInfo, ENT_QUOTES);

This will log the reason the Mailer has determined to be the cause of a failed send.

In admin, Email Log, by hovering the mouse cursor over the 'X' in the Sent column, your browser should show (as a 'tooltip') the reason reported. (I do not know if there is a limit to the amount of information that can be shown in a tooltip.)

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