Skip to content

Commit

Permalink
Fix code email out.
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jun 27, 2024
1 parent d510405 commit 8aeebe6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions htdocs/emailcollector/class/emailcollector.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -2365,14 +2365,14 @@ public function doCollectOneCollector($mode = 0)
// Try to guess if this is an email in or out.
$actioncode = 'EMAIL_IN';
// If we scan the Sent box, we use the code for out email
if (preg_match('/Sent$/', $sourcedir)) {
$actioncode = 'EMAIL_OUT';
if (preg_match('/Sent$/', $sourcedir) || preg_match('/envoyés$/i', $sourcedir)) {
$actioncode = 'EMAIL';
}
// If sender is in the list MAIL_FROM_EMAILS_TO_CONSIDER_SENDING
$arrayofemailtoconsideresender = explode(',', getDolGlobalString('MAIL_FROM_EMAILS_TO_CONSIDER_SENDING'));
foreach ($arrayofemailtoconsideresender as $emailtoconsidersender) {
if (preg_match('/'.preg_quote($emailtoconsidersender, '/').'/', $fromstring)) {
$actioncode = 'EMAIL_OUT';
$actioncode = 'EMAIL';
}
}
$operationslog .= '<br>Email will have actioncode='.$actioncode;
Expand Down

0 comments on commit 8aeebe6

Please sign in to comment.