AnsweredAssumed Answered

how to customize the from parameter of an email in 6.x?

Question asked by Rodolfo Tuble on Jul 4, 2016

I want to customize the from address of an email depending on the template used, My plan was to use jquery to change the from address but when I tried to use logic hooks to insert my new javascript file it interrupted the flow of the module and resulted in an error. So I want to ask is how do I add a custom javascript file in the email module without using the logic hooks, also is there an alternative way for me to change the from address of an email?


My Logic hooks:



    $hook_array['after_ui_frame'] = Array();

    $hook_array['after_ui_frame'][] = Array(


        'after_ui_frame example',







    if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

    class logic_hooks_class{

         function after_ui_frame_method($event, $arguments){



        protected function call_js(){

  echo '<script src="custom/modules/Emails/email.js"></script>';









Error for using logic hooks:

index.php:1 Uncaught SyntaxError: Unexpected token < in JSON at position 147 index.php