I am reading emails from our office365, using the examples in your doc:
It works but I do not get any headers in the message, where I have 4 custom headers.
If I use Microsoft own Microsoft.Graph
lib and I use code like this, I get them all:
var inboxMessages = graphClient
.Users["xx@xx.dk"]
.MailFolders["inbox"]
.Messages
.Request()
.Select("internetMessageHeaders")
.GetAsync().Result.ToList();
So here the Select("internetMessageHeaders")
option, give all the headers.
How can I do the same with your IGraphClient.FetchMessage()
?
/peter
Hello @FreddyRasmussen,
Thank you for writing to Aspose support forum.
Could you, please, clarify if you get an empty collection in the Headers property of the MapiMessage or there are some elements?
I do not get any when using FetchMessage, with this call:
public static MapiMessage DoFetchAsposeMapiMessage(string inItemId)
{
var client = DoGetAsposeGraphClient();
var asposeMapiMessage = client.FetchMessage(inItemId);
return asposeMapiMessage;
}
This is what I see under debug:
Headers {Aspose.Email.Mime.HeaderCollection} Aspose.Email.Mime.HeaderCollection
AllKeys {string[0]} string[]
Count 0 int
With the call to microsoft.graph I get 48 headers, including my custom ones.
/peter
If I make a call to ListMessages(), I get 6 headers, but not my custom ones:
public static MessageInfoCollection DoGetAsposeMessages()
{
var client = DoGetAsposeGraphClient();
return client.ListMessages(KnownFolders.Inbox);
}
Headers {Aspose.Email.Mime.HeaderCollection} Aspose.Email.Mime.HeaderCollection
/peter
@FreddyRasmussen
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): EMAILNET-41056
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.