Author |
|
mnoreen Newbie
Joined: 17 July 2012 Location: United States
Online Status: Offline Posts: 19
|
Posted: 06 January 2023 at 8:34am | IP Logged
|
|
|
I have an odd situation where there is a MailMessage that I have downloaded from m365 using IMAP. No problems with that. However, when I loop through the Headers collection, there are some name/value pairs missing that I can verify exist in 2 ways.
First, in Outlook, I can open the message, go to File/Properties and view the headers (and copy/paste them into a text file for comparison).
Second, again in Outlook, I save the message as a .msg file on disk. Then I use MsgCovert and the MsgToMailMessage() method to load that file and loop the headers collection; the headers I was looking for exist there too.
The headers are custom "X-string-string" headers added by the system generating and sending the email. Loading the message from IMAP or from the .msg on disk, I do see other Microsoft-based "x-" headers as the email was processed by m365. The only headers "missing" are 3 other custom headers.
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 06 January 2023 at 9:07am | IP Logged
|
|
|
Try to download and save the same email with another IMAP client (e.g. Mozilla Thunderbird). Do you see these headers then?
Outlook uses its own proprietary protocols when dealing with emails so it can get the info which is not accessible via IMAP, for instance.
Regards,
Alex
|
Back to Top |
|
|
mnoreen Newbie
Joined: 17 July 2012 Location: United States
Online Status: Offline Posts: 19
|
Posted: 06 January 2023 at 9:50am | IP Logged
|
|
|
I used our same system that generates and sends emails to send a new one to my custom Google Workspace email account and was able to see all the expected headers in gmail (which is just a web app of course).
I realize this might be difficult to resolve, not sure how to provide you anything to look at...
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 06 January 2023 at 10:38am | IP Logged
|
|
|
I'm afraid re-sending to another account doesn't prove or disprove anything because we don't know if M365 cuts these headers out when downloading via IMAP.
So we need to have another IMAP client which keeps these headers intact when downloading via IMAP. This way we may be able to replicate its behavior to download them with MailBee either. But if another IMAP client (Thunderbird) does not download them either, you'll have something you can go to M365 support to complain on this behavior.
Regards,
Alex
|
Back to Top |
|
|
mnoreen Newbie
Joined: 17 July 2012 Location: United States
Online Status: Offline Posts: 19
|
Posted: 17 January 2023 at 6:48am | IP Logged
|
|
|
FWIW, here's what I discovered: I have a console app using Mailbee/IMAP to read emails out of a mailbox that I was updating to read certain custom headers. To test the console app, I copied mail messages of interest to a certain subfolder of the mailbox (using an Outlook client that had access to that mailbox). That's when I discovered the console app wasn't finding the headers that I could see using that same Outlook client.
Here's the interesting part... If I *moved* the messages to the subfolder (instead of copied), then the IMAP console app did see the custom headers.
You mentioned Outlook essentially doing its own thing, so I guess that's at the root of it. Although I don't pretend to understand it , I can work around it.
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 17 January 2023 at 6:56am | IP Logged
|
|
|
Interesting observation, thanks for posting back!
Regards,
Alex
|
Back to Top |
|
|