Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

from email on orders


varnco

Recommended Posts

Currently, I am receiving notifcations of orders by using the Send Copy to function in the admin.

 

However, the emails come in with the "from" address of my domain, and not the customer's email address.

 

I want to change this so the customer's email address is in the from field rather than my store's email address.

 

so, if [email protected] orderes from me, the order email is sent to [email protected], but in the "from" field on the email it lists [email protected] rather than [email protected].

 

Will this do the trick (found this on the forum for a situation similar to what I need)?

 

In checkout_process.php, change:

CODE

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

 

to:

CODE

tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order . "\n" . $order->customer['email_address'] . "\n", STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

 

I'm not sure how to tell checkoutprocess.php to send the extra order email to me (the store) but to place the customer's email in the "from" section of the email.

 

Any help is appreciated.

 

Thanks!

Link to comment
Share on other sites

  • 9 months later...
Did you figure out how to get the from address to be the customers email address?

 

No, I've tried many variations of the above code, and haven't been able to get it to work. I'm amazed that no one else finds it a pain that the send extra emails sends it from the store, so you can't reply to the order and ask customer for clarification. You have to reply then cut and paste the customer's email address.

 

A pain.

 

I'll be giving it a try again and just break it until I can figure something out on it.

 

Let me know if you have any success.

Link to comment
Share on other sites

No, I've tried many variations of the above code, and haven't been able to get it to work. I'm amazed that no one else finds it a pain that the send extra emails sends it from the store, so you can't reply to the order and ask customer for clarification. You have to reply then cut and paste the customer's email address.

 

A pain.

 

I'll be giving it a try again and just break it until I can figure something out on it.

 

Let me know if you have any success.

This worked for me:

 

I replaced lines 270-273 with this (now lines 270-275)

270 // send emails to other people
271 // the line below is the original line that was commented out -- 
272 // tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
273 if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
274	tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, $order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address']);
275 }

 

let me know if this helps

 

j

Link to comment
Share on other sites

This worked for me:

 

I replaced lines 270-273 with this (now lines 270-275)

270 // send emails to other people
271 // the line below is the original line that was commented out -- 
272 // tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
273 if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
274	tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, $order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address']);
275 }

 

let me know if this helps

 

j

 

Hmmm... it's not working for me, but I have email invoice installed, which sends out a nicer email than the stock OSC. I add the coding to checkout_process.php, but I still get it coming from my store.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...