In SugarCRM this used to work before doing a Migration over to SuiteCRM. Fixed a few things with the help of the community here however the “No Auto-Reply to this Domain: none” no longer works. I have tested with one domain vs multiple comma seperated which do not work.
I’m pretty sure this is handled in InboundEmail.php, Please see function below, have I found the right area? Can someone help me debug whether $filterDomain contacts anything? From the debug below it seems in the log I can tail for Autoreply but the log isn’t showing any of this even though I have debug level activated.
public function checkFilterDomain($email)
{
$filterDomain = $this->get_stored_options('filter_domain');
if (!isset($filterDomain) || empty($filterDomain)) {
return true; // nothing set for this
} else {
$replyTo = strtolower($email->reply_to_email);
$from = strtolower($email->from_addr);
$filterDomain = '@' . strtolower($filterDomain);
if (strpos($replyTo, $filterDomain) !== false) {
$GLOBALS['log']->debug('Autoreply cancelled - [reply to] address domain matches filter domain.');
return false;
} elseif (strpos($from, $filterDomain) !== false) {
$GLOBALS['log']->debug('Autoreply cancelled - [from] address domain matches filter domain.');
return false;
} else {
return true; // no match
}
}
}
If you can, try doing a proper debug with XDEBUG and an IDE.
If you need to do debugging just from the log, start with an entry right at the top of the function, so you can make sure it is being called, and try a print_r or vardump of the filter_domain array to see if has the correct list to match.
If you need to check the list itself (if it is getting saved correctly), check in the database the table “inbound_email”, column “stored_options”.
Yeah i compared a fresh LTS install vs our install and it is storing the filter_domain etc. Thank you pgr for assisting you always seem to know where something is or how it’s meant to work.will be hard to debug live version as its 15gb in size. will have to try and understand the inbound email php code etc.