Jump to content

[SOLVED] How to send email and do the redirect


Recommended Posts

Hello everyone,

 

Im building a module which will send an email to user and redirect him right after the account is created.

Email is fine, it is sent but I have stuck with redirect... here is the code

 

public function hookActionCustomerAccountAdd($params)

{

................

Mail::Send($this->context->language->id, 'aktywacja_konta', 'Aktywacja konta klienta', $tplVars, $email , $z['firstname'].' '.$z['lastname'],Configuration::Get('PS_SHOP_NAME'), NULL, NULL, NULL, dirname(__FILE__).'/mails/');

Tools::redirect('http://sklep.pl/some_site.php');

}

 

Can anybody tell me why code runs fine to Mail::Send but stops at Tools::redirect???

 

Thanks in advance.

Link to comment
Share on other sites

×
×
  • Create New...