1. chewkyk
  2. General
  3. Monday, September 03 2018, 02:05 PM
Can I send a copy of the submission to my designated email each time a user submit?
admin Accepted Answer
Admin
Hi,
Easy Profile does not do this, but you can use a simple custom plugin, please follow these steps:
- Download (at the end of docs page at http://docs.easy-profile.com/index.php/article/triggers ), install and enable (Extensions->Plugins) skeleton plugin
- Open the edit the file at /plugins/jsn/skeleton/skeleton.php
- Replace entire code with this
<?php

defined('_JEXEC') or die;

class PlgJsnSkeleton extends JPlugin
{
public function triggerProfileUpdate($user, $data, $changed, $isNew)
{
if(!$isNew)
{
$body=$user->name." updated user profile. \n\n";
foreach($changed as $fieldalias){
$body.=$fieldalias .": ". $data[$fieldalias] ."\n";
}
$config = JFactory::getConfig();
$result=JFactory::getMailer()->sendMail(
$config->get( 'mailfrom' ), // Sender Mail
$config->get( 'fromname' ), // Sender Name
'admin1@email.com', // Receiver Mail
'Profile Updated', // Subject Mail
$body // Body Mail
);
}
}
}

?>
IMPORTANT: Replace admin1@email.com with email of receiver
  1. more than a month ago
  2. General
  3. # 1
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.