Jump to content

Archived

This topic is now archived and is closed to further replies.

psleman

Order notification email not working

Recommended Posts

Hello Forum,

On one of my companies sites the order notification email is not being sent to our customers as well as to the store owner email address.  I think it has to do with the "checkout process" file. Below is the code that does not seem to be working.  Any feedback will be welcome. Thank you. 

 

  // by azad for converting \n to <br>
  //$email_order = str_replace("\n", "<br><br>", $email_order);
  $email_order = str_replace("United Parcel Service", "Shipping Information ", $email_order);
 //send email to customer
tep_mail ($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->STORE_OWNER['email_address'], CONFIRMATION, ' ' , $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
 //tep_mail("", "", EMAIL_TEXT_SUBJECT, $email_order, "", "");
  //send email to store manager
//tep_mail ($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->STORE_OWNER['email_address'], CONFIRMATION. ' ' , //$email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

// send emails to other people
(SEND_EXTRA_ORDER_EMAILS_TO != '')
tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

// load the after_process function from the payment modules
  $payment_modules->after_process();

  $cart->reset(true);
 

Share this post


Link to post
Share on other sites

Are any emails sending?  Order?  Customer registration?  Forgot password? 

Have you tried Harald's test script:  https://apps.oscommerce.com/FZ5wN&e-mail-testing-script

That just uses the base PHP functions, so it tells you if the problem is store (usually configuration) or PHP. 

You may want to check the log files for the site.  Sometimes they will tell you something useful. 

The $order->STORE_OWNER['email_address'] looks to be wrong.  The line should probably be

  tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 


Always back up before making changes.

Share this post


Link to post
Share on other sites

Hi Folks,

For 10 years my 'Order Process' emails have been hit and miss. It's been 6 months since one has sent.

After some digging around I found a suggestion at oscmax forum that it may be the mail server blocking due to the words 'Order Process'. I called my host, Godaddy who checked and confirmed there were not restrictions specifically on my account although... After changing ...includes/languages/english/checkout_process.php   define('EMAIL_TEXT_SUBJECT', ' Order Process');   to define('EMAIL_TEXT_SUBJECT', ' MyStoreName Order Confirmation'); I am now getting order confirmation emails.

I hope this helps others too.

Share this post


Link to post
Share on other sites
On 12/28/2017 at 1:01 PM, mmph said:

Hi Folks,

For 10 years my 'Order Process' emails have been hit and miss. It's been 6 months since one has sent.

After some digging around I found a suggestion at oscmax forum that it may be the mail server blocking due to the words 'Order Process'. I called my host, Godaddy who checked and confirmed there were not restrictions specifically on my account although... After changing ...includes/languages/english/checkout_process.php   define('EMAIL_TEXT_SUBJECT', ' Order Process');   to define('EMAIL_TEXT_SUBJECT', ' MyStoreName Order Confirmation'); I am now getting order confirmation emails.

I hope this helps others too.

I regret to report that my order confirmation emails have stopped sending again. All other store emails function properly. I'm back to the drawing boards.

Share this post


Link to post
Share on other sites
19 minutes ago, mmph said:

I regret to report that my order confirmation emails have stopped sending again. All other store emails function properly. I'm back to the drawing boards.

I should also note that my work around may still be applicable although I am using One Page Checkout which may also be the cause of order confirmation emails not sending. I cannot turn of OPC at the moment because I get and SSL warning without it stopping customers from checking out.

Share this post


Link to post
Share on other sites

×