Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding BCC to account creation email sent to customer


dontbewillful

Recommended Posts

Posted

It'd be just as easy (or easier) to just send yourself a copy of the same email.

 

In /catalog/create_account.php find this code:

 

	  tep_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

Just AFTER it ADD this code:

 

	  tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

BACKUP THE FILE BEFORE EDITING.

 

There's many a slip twixt the cup and the lip...

:blush:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

I doodled with this a bit.

 

I replaced this code:

 

	  tep_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

With:

 

	  $headers = 'From: ' . STORE_OWNER_EMAIL_ADDRESS . "\r\n" . 'Bcc: ' . STORE_OWNER_EMAIL_ADDRESS . "\r\n";
  mail($email_address , EMAIL_SUBJECT , $email_text , $headers, '');

And it worked for me (doing a Bcc).

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

  • 5 months later...
Posted

i followed your examples to make a copy of every order to store's email

 

in the admin/order.php is this line

 

tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

so at first i double wrote it

 

tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

but the email went only once ... it shouldn't go 2 times since there are 2 lines ?

 

and then i want to send a copy to my store's email so i tried some thoughts unsuccessfully

 

tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
tep_mail(STORE_OWNER_EMAIL_ADDRESS, EMAIL_TEXT_SUBJECT, $email);

 

or

 

tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
mail ( [email protected] , EMAIL_TEXT_SUBJECT , $email);

 

can you help ?

  • 1 year later...
Posted

I doodled with this a bit.

 

I replaced this code:

 

	  tep_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

With:

 

	  $headers = 'From: ' . STORE_OWNER_EMAIL_ADDRESS . "\r\n" . 'Bcc: ' . STORE_OWNER_EMAIL_ADDRESS . "\r\n";
  mail($email_address , EMAIL_SUBJECT , $email_text , $headers, '');

And it worked for me (doing a Bcc).

I've tried the above and it basically works, however what used to be sent as a HTML page is now sent as HTML code (plain text with html code). What can be done to restore the email to being sent as HTML please?

 

Thanks in advance :)

____________________________________________________________________

____________________________________________________________________

Archived

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

×
×
  • Create New...