Jump to content

I would like to be sent to me the welcome email.


Recommended Posts

Ah, so you want to be informed when a new user registers? It can't be done without modifying the php code, you need to add the mail::send with possibly a new template. It's a bit of a long explanation, are you a developer?

Link to comment
Share on other sites

controllers/front/AuthController.php

line 704

 

there is a function like:
 

protected function sendConfirmationMail(Customer $customer)
	{
		if (!Configuration::get('PS_CUSTOMER_CREATION_EMAIL'))
			return true;

		return Mail::Send(
			$this->context->language->id,
			'account',
			Mail::l('Welcome!'),
			array(
				'{firstname}' => $customer->firstname,
				'{lastname}' => $customer->lastname,
				'{email}' => $customer->email,
				'{passwd}' => Tools::getValue('passwd')),
			$customer->email,
			$customer->firstname.' '.$customer->lastname
		);
	}

add there another Mail::send function as nemo suggested,
instead $customer->email variable use shop email: Configuration::get('PS_SHOP_EMAIL'),

protected function sendConfirmationMail(Customer $customer)
	{
		if (!Configuration::get('PS_CUSTOMER_CREATION_EMAIL'))
			return true;

                Mail::Send(
			$this->context->language->id,
			'account',
			Mail::l('Welcome!'),
			array(
				'{firstname}' => $customer->firstname,
				'{lastname}' => $customer->lastname,
				'{email}' => $customer->email,
				'{passwd}' => Tools::getValue('passwd')),
			$customer->email,
			$customer->firstname.' '.$customer->lastname
		);


		return Mail::Send(
			$this->context->language->id,
			'account',
			Mail::l('Welcome!'),
			array(
				'{firstname}' => $customer->firstname,
				'{lastname}' => $customer->lastname,
				'{email}' => $customer->email,
				'{passwd}' => Tools::getValue('passwd')),
			Configuration::get('PS_SHOP_EMAIL'),
			$customer->firstname.' '.$customer->lastname
		);
	}

you will receive exactly the same email as customer receive

  • Like 1
Link to comment
Share on other sites

Ah, so you want to be informed when a new user registers? It can't be done without modifying the php code, you need to add the mail::send with possibly a new template. It's a bit of a long explanation, are you a developer?

 

Thank you for your kindly response.

Link to comment
Share on other sites

×
×
  • Create New...