diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 9f1d921691c..39686c6e82f 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -1436,8 +1436,13 @@ class EmailCollector extends CommonObject foreach ($arrayofreferences as $reference) { //print "Process mail ".$iforemailloop." email_msgid ".$msgid.", date ".dol_print_date($date, 'dayhour').", subject ".$subject.", reference ".dol_escape_htmltag($reference)."
\n"; - if (preg_match('/dolibarr-([a-z]+)([0-9]+)@'.preg_quote($host, '/').'/', $reference, $reg)) { - // This is a Dolibarr reference + $resultsearchtrackid = preg_match('/dolibarr-([a-z]+)([0-9]+)@'.preg_quote($host, '/').'/', $reference, $reg); + if (empty($resultsearchtrackid) && getDolGlobalString('EMAIL_ALTERNATIVE_HOST_SIGNATURE')) { + $resultsearchtrackid = preg_match('/dolibarr-([a-z]+)([0-9]+)@'.preg_quote(getDolGlobalString('EMAIL_ALTERNATIVE_HOST_SIGNATURE'), '/').'/', $reference, $reg); + } + + if ($resultsearchtrackid) { + // This is a Dolibarr reference of the server $trackid = $reg[1].$reg[2]; $objectid = $reg[2]; diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 352db2e0910..264dc86b440 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -2091,7 +2091,7 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record an event in agenda (with type Email sent or received) CreateLeadAndThirdParty=Create a lead (and a third party if necessary) -CreateTicketAndThirdParty=Create a ticket (linked to a third party if the third party was loaded by a previous operation, with no third party otherwise) +CreateTicketAndThirdParty=Create a ticket (linked to a third party if the third party was loaded by a previous operation or was guessed from a tracker in email header, without third party otherwise) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only)