Jump to content

Stop new Account Welcome Email


Recommended Posts

I don't know if there is a way to disable the email by configuration. I guess there is not.
but you can do this by commeting out some lines of code

comment out following lines in file

1.3x - YourSiteRoot/authentication.php
1.4x - YourSiteRoot/controllers/AuthController.php

/*

   if (!Mail::Send(intval($cookie->id_lang), 'account', 'Welcome!', 
   array('{firstname}' => $customer->firstname, '{lastname}' => $customer->lastname, '{email}' => $customer->email, '{passwd}' => Tools::getValue('passwd')), $customer->email, $customer->firstname.' '.$customer->lastname))
       $errors[] = Tools::displayError('cannot send email');

*/

Link to comment
Share on other sites

  • 1 year later...
  • 3 months later...

Hi,

For 1.5 I made a controller override:

Create a file in Prestashop ROOT > override > controllers > AuthController.php

 

I then put this into it

<?php
class AuthController extends AuthControllerCore
{

protected function sendConfirmationMail(Customer $customer)
{
 return true;
}

}
?>

 

This removes the mail function and returns true so Prestashop things it was sent. If you don't return true you get an error message saying the email was not sent.

Link to comment
Share on other sites

an approach that requires no coding changes and/or using class overrides

 

rename the emails that are used for new account notification (to the customer)

 

mails/(lang folder name/account.html and account.txt

 

This way when PS goes to send the email and doesn't not find that template it will then, do nothing, i.e not send the email.

Edited by eTiendas.co (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 1 year later...
×
×
  • Create New...