More logs

This commit is contained in:
Laurent Destailleur 2022-06-03 13:51:47 +02:00
parent a402730355
commit a9ea1c8fbb
2 changed files with 6 additions and 1 deletions

View File

@ -1266,12 +1266,14 @@ class EmailCollector extends CommonObject
if ($searchfilterdoltrackid > 0) {
if (empty($headers['References']) || !preg_match('/@'.preg_quote($host, '/').'/', $headers['References'])) {
$nbemailprocessed++;
dol_syslog(" Discarded - No header References found");
continue; // Exclude email
}
}
if ($searchfilternodoltrackid > 0) {
if (!empty($headers['References']) && preg_match('/@'.preg_quote($host, '/').'/', $headers['References'])) {
$nbemailprocessed++;
dol_syslog(" Discarded - Header References found and matching signature of application");
continue; // Exclude email
}
}
@ -1279,6 +1281,7 @@ class EmailCollector extends CommonObject
if ($searchfilterisanswer > 0) {
if (empty($headers['In-Reply-To'])) {
$nbemailprocessed++;
dol_syslog(" Discarded - Email is not an answer (no In-Reply-To header");
continue; // Exclude email
}
// Note: we can have
@ -1292,6 +1295,7 @@ class EmailCollector extends CommonObject
if (!$isanswer) {
$nbemailprocessed++;
dol_syslog(" Discarded - Email is not an answer (no RE prefix in subject)");
continue; // Exclude email
}
}
@ -1307,6 +1311,7 @@ class EmailCollector extends CommonObject
//if ($headers['In-Reply-To'] != $headers['Message-ID'] && !empty($headers['References']) && strpos($headers['References'], $headers['Message-ID']) !== false) $isanswer = 1;
if ($isanswer) {
$nbemailprocessed++;
dol_syslog(" Discarded - Email is an answer");
continue; // Exclude email
}
}

View File

@ -2059,7 +2059,7 @@ VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>
SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents
FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature.
EmailCollector=Email collector
EmailCollectors=Emails collectors
EmailCollectors=Email collectors
EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads).
NewEmailCollector=New Email Collector
EMailHost=Host of email IMAP server