Add option EMAIL_ALTERNATIVE_HOST_SIGNATURE

This commit is contained in:
Laurent Destailleur 2022-05-10 19:23:30 +02:00
parent 2dc97ac3ae
commit c4f4754b5b
2 changed files with 8 additions and 3 deletions

View File

@ -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)."<br>\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];

View File

@ -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)