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

Originally a fork of Combodo's Mail to Ticket Automation, enriched with some new features. Also contains some bug fixes.
https://jeffreybostoen.be
6 stars 3 forks source link

Missing e-mail headers #37

Open jbostoen opened 1 year ago

jbostoen commented 1 year ago

While trying to reproduce an issue on a Windows 11 environment (still PHP 7.4.26), it seemed the auto-bounce policy failed.

Further investigation seems to indicate some e-mail headers were simply not processed.

This goes all the way back to the imap_fetchheader call. Other headers indicate it's the proper message, but for some reason some headers are missing.

One StackOverflow post suggests more headers may be visible in Microsoft Outlook because it may get more headers from MS Exchange: https://stackoverflow.com/questions/39347494/imap-fetchheader-not-getting-all

However, using the same code in production (PHP: 8.0.28) in a Linux environment and even using the same credentials and version of this extension, it worked.

So this is likely caused by a difference in PHP version, or OS?

jbostoen commented 1 year ago

Upgraded to PHP 8.0.28 (XAMPP) on Windows. Same result. (Screenshot: left)

When comparing the .EML file retrieved from both environments, aside from the missing headers, it also appears one implementation (Windows/XAMPP) lowercased some e-mail headers. This was not the case for the Linux environment (Screenshot: right).

image