jbostoen/itop-jb-mail-to-ticket-automation-v2

Issue with retrieving received time (IMAP / OAuth 2.0)

Closed this issue · 2 comments

This error could be observed:

PHP Warning: strtotime() expects parameter 1 to be string, array given in /var/www/html/itop/web/env-production/jb-email-synchro/src/Service/IMAPOAuthEmailSource.php on line 140

Fixed with e30a0e4

Note that some headers include additional information:

Received: from VI1PR02MB5997.eurprd02.prod.outlook.com (2603:10a6:800:182::9)
 by PR3PR02MB6393.eurprd02.prod.outlook.com with HTTPS; Thu, 20 Oct 2022
 08:36:28 +0000
ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass

Delivery-Date is sometimes present, but optional.

Note: the related PHP error was misleading:

Warning: Invalid argument supplied for foreach() in /var/www/html/itop-oauth/env-production/jb-email-synchro/classes/emailbackgroundprocess.class.inc.php on line 170