Advertisement:

Author Topic: custom email not being sent using exisitng email template  (Read 339 times)

Doudge

  • Newbie
  • *
  • Posts: 25
custom email not being sent using exisitng email template
« on: May 12, 2017, 12:36:18 am »
Hi,
I found the solution in the link given below using a function in functions.php to send an email to the user after item posted, but it didn't work. Could you please help with it. I have the latest osclass installation.

https://forums.osclass.org/plugins-20/how-to-change-an-ad-state-to-blocked-just-after-published/
Code: [Select]
<?php
function cust_approved_item_mail($id) {
    
$eItem Item::newInstance()->findByPrimaryKey($id);
    
View::newInstance()->_exportVariableToView('item'$eItem);
    
fn_email_new_item_non_register_user($eItem);
}
osc_add_hook('posted_item''cust_approved_item_mail');
osc_add_hook('edited_item''cust_approved_item_mail');
?>


Doudge

  • Newbie
  • *
  • Posts: 25
Re: custom email not being sent using exisitng email template
« Reply #1 on: May 12, 2017, 01:21:32 am »
i fixed it by just having the following hook in the functions.php.

Code: [Select]
<?php
    osc_add_hook
('hook_email_admin_new_item''fn_email_new_item_non_register_user');
?>