Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Modified tep_mail function dupes emails?


skeedo

Recommended Posts

Posted

I have added this in general.php to function tep_mail so I could send an extra email when I got an order:

 

// Send message

$message->build_message();

$message->send($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject);

$message->send('Bob', '[email protected]', $from_email_name, $from_email_address, $email_subject);

}

 

Unfortunately the emails to 'Bob' are being duplicated, why?

Posted

The function is called twice in some places.

 

If you add that to general.php it is always being done for each call.

 

Two calls means double the emails to Bob ... :shock:

Posted

I see, probably to send an order email to the customer and an extra one to me.

 

So how do I get just one order email to customer, me and Bob ?

 

Apparently from the extra order email help text you can enter multiple email addresses...but it does not work.

Posted

Nm, got it. Just added this to checkout_process.php.

 

tep_mail('', '[email protected]', EMAIL_TEXT_SUBJECT . ' #' . $insert_id, nl2br($email_order), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, '');

Posted

That works better.

 

Did you try using the Send Extra emails option in the Admin?

Posted

Try just the email addresses without the names seperated with a comma and see if that works.

Archived

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

×
×
  • Create New...