You helped me to understand in what direction to look. So now I can formilate some advice for troubleshooting for many situation in linux.
You have a problem to fix something, yes? For example let’s take my problem
1)I see that I receive email(that I mentioned before), in that email I see unchangable text: “Please reply above this line”
And I have no idea where it takes it from. But I know what to do, just type in linux CLI:
root@crm-server:~# grep -rl "Please reply above this line" /var/www/suitecrm/
/var/www/suitecrm/include/language/en_us.lang.php
2)Now we know where CRM take that text. In en_us.lang.php I can found that line:
$app_strings['LBL_AOP_EMAIL_REPLY_DELIMITER'] = '========== Please reply above this line ==========';
That’s mean that CRM use string LBL_AOP_EMAIL_REPLY_DELIMITER in his code.
Now, by that string let’s see where he use it:
root@crm-server:~# grep -rl “LBL_AOP_EMAIL_REPLY_DELIMITER” /var/www/suitecrm/modules/
/var/www/suitecrm/modules/AOP_Case_Updates/CaseUpdatesHook.php
/var/www/suitecrm/modules/AOP_Case_Updates/AOP_Case_Updates.php
3)As had been mentioned before (with little bit mistake) those 2 files send emails. And with my example, without any knowledge in CRM file system, you can find alone crutial files that must be changed.
But let’s continue.
In AOP_Case_Updates.php we found where we use that string:
private function populateTemplate(EmailTemplate $template, $addDelimiter = true, $contactId = null){
global $app_strings, $sugar_config;
//Order of beans seems to matter here so we place contact first.
$userId = '';
$user = $this->getUpdateUser();
if(!$user){
$this->getUser();
}
$beans = array("Contacts" => $contactId,"Cases" => $this->getCase()->id, "Users" => $user->id, "AOP_Case_Updates" => $this->id);
$ret = array();
$ret['subject'] = from_html(aop_parse_template($template->subject,$beans));
$body = aop_parse_template(str_replace("\$sugarurl",$sugar_config['site_url'],$template->body_html),$beans);
$bodyAlt = aop_parse_template(str_replace("\$sugarurl",$sugar_config['site_url'],$template->body),$beans);
if($addDelimiter){
$body = $app_strings['LBL_AOP_EMAIL_REPLY_DELIMITER'] . $body;
$bodyAlt = $app_strings['LBL_AOP_EMAIL_REPLY_DELIMITER'] . $bodyAlt;
}
$ret['body'] = from_html($body);
$ret['body_alt'] = strip_tags(from_html($bodyAlt));
return $ret;
}
Also we have some code in second file CaseUpdatesHook.php
And I have no idea how to change that code, so it will stop send emails without been broken and cause even more mess. Example that I received from item I don’t understand and that’s why can’t use.