Notifications module: Problem with sending email massage
Posted: Mon Nov 03, 2014 12:17 am
Hi all,
I'm trying to use Notifications module. I would like that when someone registers through FEU, receives an automatic email of confirmation.
In Notifications module, in ''Events:" I chose "Selfregistration: onUserRegistred" and then I created the following:
Unfortunately, I worked several hours and was not able to set it up and I can not find even any suggestions on the Web.
Someone would be kind and tell me what's the problem?
Thank you very much
Far
I'm trying to use Notifications module. I would like that when someone registers through FEU, receives an automatic email of confirmation.
In Notifications module, in ''Events:" I chose "Selfregistration: onUserRegistred" and then I created the following:
Code: Select all
$feu = cmsms()->GetModuleInstance('FrontEndUsers');
$smarty = cmsms()->GetSmarty();
if(($feu->status == 'LoggedInId')) {
$notification->from_address = 'info@domain.com';
$notification->to_address = $feu->GetUserName($feu->to_id);
}
// get user proerties
foreach ($feu->GetUserProperties($feu->to_id) as $prop) {
$to_user_props[$prop['title']] = $prop['data'];
}
// pass properties to smarty
$smarty->assign('to_first_name', $to_user_props['all_first_name']);
$smarty->assign('to_last_name', $to_user_props['all_last_name']);
Someone would be kind and tell me what's the problem?
Thank you very much
Far