Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Extra Order Emails Not Working - tried all configurations, please help with code


steffanih

Recommended Posts

Posted

Hi,

I have tried every variation of entering the email address in the send extra order emails (IE: [email protected], wm <[email protected]>, <[email protected]>, "wm" <[email protected]>, order Received <[email protected]>). I am on windows hosting IIS7, Godaddy. Al other email functions are working except we don't receive email notification when a customer has placed an order.

 

I found a forum entry where someone was receiving 3 copies of extra emails. Can you take a look at that section of code checkout_process.php and see if this is where the problem lies?

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

else

{

$email_order = STORE_NAME . "\n" . 
                EMAIL_SEPARATOR . "\n" . 
                EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .
                EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "\n" .
                EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";
 if ($order->info['comments']) {
+    $email_order .= tep_db_output($order->info['comments']) . "\n\n";
 }
 $email_order .= EMAIL_TEXT_PRODUCTS . "\n" . 
                 EMAIL_SEPARATOR . "\n" . 
                 $products_ordered . 
                 EMAIL_SEPARATOR . "\n";

 for ($i=0; $i<sizeof($order_totals); $i++) {
   $email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n";
 }

 if ($order->content_type != 'virtual') {
   $email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" . 
                   EMAIL_SEPARATOR . "\n" .
                   tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n";
 }

 $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" .

                 EMAIL_SEPARATOR . "\n" .
                 tep_address_label($customer_id, $billto, 0, '', "\n") . "\n\n";
 if (is_object($$payment)) {
   $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . 
                   EMAIL_SEPARATOR . "\n";
   $payment_class = $$payment;
   $email_order .= $payment_class->title . "\n\n\n\n\n";
   if ($payment_class->email_footer) { 
     $email_order .= $payment_class->email_footer . "\n\n";
   }
 }

 $email_order .= "\n" . EMAIL_TEXT_FOOTER . "\n" .
                       HTTP_SERVER . DIR_WS_CATALOG . "\n" . 
                       EMAIL_TEXT_FOOTERR . "\n" ;

}
   tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, nl2br($email_order), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, '');
   $email_order=ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a href=\"\\0\">\\0</a>", $email_order);
 } 

 

This was the information he included:

error_log("checkout_process - sending email: gc_prod=" . $gc_prod . " gc_image=" . $gc_image . " products_options_name=" . $attributes_values['products_options_name']=="Gift Certificate Email" . " products_options_values_name=" . $attributes_values['products_options_values_name'] . "sendgcemail=" . $sendgcemail);

// send emails to other people

if (SEND_EXTRA_ORDER_EMAILS_TO != '') {

tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

}

 

I do not have the codeline above his send emails to other people line, I found that section and replaced the next couple of lines and received error codes at checkout.

 

I appreciate the help! Thanks.

Archived

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

×
×
  • Create New...