# Automatic email notification on kreporter assignment

**URL:** <https://community.spicecrm.io/t/automatic-email-notification-on-kreporter-assignment/225>\
**Category:** KReporter\
**Created:** [December 22, 2017, 11:03am UTC](https://community.spicecrm.io/t/automatic-email-notification-on-kreporter-assignment/225 "2017-12-22T11:03:12Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![Pat](https://avatars.discourse-cdn.com/v4/letter/p/8491ac/32.png) [@Pat](https://community.spicecrm.io/u/Pat)\
**Post date:** [January 17, 2018, 3:05pm UTC](https://community.spicecrm.io/t/automatic-email-notification-on-kreporter-assignment/225/21 "2018-01-17T15:05:01Z")

</div>

Hi again Val,

I debugged _SugarBean.php_ and found that the problem was in this point:

> if(in\_array(‘set\_notification\_body’, get\_class\_methods($this))) {  
> $xtpl = $this-\>set\_notification\_body($xtpl, $this);  
> } else {  
> $xtpl-\>assign(“OBJECT”, translate(‘LBL\_MODULE\_NAME’));  
> $template\_name = “Default”;  
> }

It was taking the “else” path, because it didn’t find _set\_notification\_body_ as a Kreports class method. Checking one more time /modules/KReports/KReport.php file I found that _set\_notification\_body_ function was in _KReportRenderer_ class. I moved it to _KReport_ class and after a _Repair and rebuild_… I got it working!! 😃

Thank you very much for your support Val. I’m so grateful.

Pat

---

<div class="post-metadata">

**Author:** ![maretval](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@maretval](https://community.spicecrm.io/u/maretval)\
**Post date:** [January 17, 2018, 3:18pm UTC](https://community.spicecrm.io/t/automatic-email-notification-on-kreporter-assignment/225/22 "2018-01-17T15:18:19Z")

</div>

Pat,  
great job ! 👏  
Val

---

<div class="post-metadata">

**Author:** ![Pat](https://avatars.discourse-cdn.com/v4/letter/p/8491ac/32.png) [@Pat](https://community.spicecrm.io/u/Pat)\
**Post date:** [January 17, 2018, 3:22pm UTC](https://community.spicecrm.io/t/automatic-email-notification-on-kreporter-assignment/225/23 "2018-01-17T15:22:55Z")

</div>

Thanks!!! 🙂

Pat

[Previous page](https://community.spicecrm.io/t/automatic-email-notification-on-kreporter-assignment/225.md?page=1)
