/** * Called from $this->getMessageText() * Allows upgrade-safe custom processing of message text. * * To use: * 1. Create a directory path: ./custom/modules/InboundEmail if it does not exist * 2. Create a file in the ./custom/InboundEmail/ folder called "getMessageText.php" * 3. Define a function named "custom_getMessageText()" that takes a string as an argument and returns a string * * @param string $msgPart * @return string */ function customGetMessageText($msgPart) { $custom = "custom/modules/InboundEmail/getMessageText.php"; if (file_exists($custom)) { include_once $custom; if (function_exists("custom_getMessageText")) { $GLOBALS['log']->debug("*** INBOUND EMAIL-CUSTOM_LOGIC: calling custom_getMessageText()"); $msgPart = custom_getMessageText($msgPart); } } return $msgPart; }
/** * Called from $this->getMessageText() * Allows upgrade-safe custom processing of message text. * * To use: * 1. Create a directory path: ./custom/modules/InboundEmail if it does not exist * 2. Create a file in the ./custom/InboundEmail/ folder called "getMessageText.php" * 3. Define a function named "custom_getMessageText()" that takes a string as an argument and returns a string * * @param string $msgPart * @return string */ function customGetMessageText($msgPart) { if (SugarAutoLoader::requireWithCustom("modules/InboundEmail/getMessageText.php")) { if (function_exists("custom_getMessageText")) { $GLOBALS['log']->debug("*** INBOUND EMAIL-CUSTOM_LOGIC: calling custom_getMessageText()"); $msgPart = custom_getMessageText($msgPart); } } return $msgPart; }