Jump to content

Make "from"-adress in Mailalerts customer email


Recommended Posts

When I get a mail from Mailalerts that an order has been placed, I would like the from-(or Answer to...-) adress of the mail to be the customer email adress, instead of the shop-email.

That way I can quickly respond to the customer via mail, without copying and pasting their emailadress.

 

Is it possible to do ?

Link to comment
Share on other sites

Assuming you are using the latest module/ps

 

Line 396 of mailalerts.php

				Mail::Send(
					$id_lang,
					'new_order',
					sprintf(Mail::l('New order : #%d - %s', $id_lang), $order->id, $order->reference),
					$template_vars,
					$merchant_mail,
					null,
					$configuration['PS_SHOP_EMAIL'],
					$configuration['PS_SHOP_NAME'],
					null,
					null,
					$dir_mail,
					null,
					$id_shop
				);

Change it to

				Mail::Send(
					$id_lang,
					'new_order',
					sprintf(Mail::l('New order : #%d - %s', $id_lang), $order->id, $order->reference),
					$template_vars,
					$merchant_mail,
					null,
					$customer->email,
					$configuration['PS_SHOP_NAME'],
					null,
					null,
					$dir_mail,
					null,
					$id_shop
				);
  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...