Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET Objects

 AfterLogic Forum : MailBee.NET Objects
Subject Topic: Headers collection missing values Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
mnoreen
Newbie
Newbie


Joined: 17 July 2012
Location: United States
Online Status: Offline
Posts: 19
Posted: 06 January 2023 at 8:34am | IP Logged Quote mnoreen

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 View mnoreen's Profile Search for other posts by mnoreen
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 06 January 2023 at 9:07am | IP Logged Quote Alex

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 View Alex's Profile Search for other posts by Alex
 
mnoreen
Newbie
Newbie


Joined: 17 July 2012
Location: United States
Online Status: Offline
Posts: 19
Posted: 06 January 2023 at 9:50am | IP Logged Quote mnoreen

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 View mnoreen's Profile Search for other posts by mnoreen
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 06 January 2023 at 10:38am | IP Logged Quote Alex

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 View Alex's Profile Search for other posts by Alex
 
mnoreen
Newbie
Newbie


Joined: 17 July 2012
Location: United States
Online Status: Offline
Posts: 19
Posted: 17 January 2023 at 6:48am | IP Logged Quote mnoreen

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 View mnoreen's Profile Search for other posts by mnoreen
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 17 January 2023 at 6:56am | IP Logged Quote Alex

Interesting observation, thanks for posting back!

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide