I was using below code but i dont get any email when i change profiles:
<?php
/**
* @copyright Copyright (C) 2013 Jsn Project company. All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
* @package Easy Profile
* website http://www.easy-profile.com
* Technical Support : Forum - http://www.easy-profile.com/support.html
*/
defined('_JEXEC') or die;
class PlgJsnSkeleton extends JPlugin
{
public function triggerProfileUpdate($user, &$data, $changed, $isNew)
{
if(!$isNew)
{
// Start body of email
$body=$user->name." updated user profile. \n\n";
// Add fields to body email
foreach($changed as $fieldalias){
$body.=$fieldalias .": ". $data[$fieldalias] ."\n";
}
// Send Email
$result=JFactory::getMailer()->sendMail(
$user->email, // Sender Mail
$user->name, // Sender Name
'[email protected]', // Receiver Mail
'Profile Updated', // Subject Mail
$body // Body Mail
);
}
}
}
?>