Hi Aspose,
We bought Aspose.Email . NET, and would like to use it for mail copying from Outlook to Exchange (Unified Group) mailbox.
We have already developed an API that does the work, but we have an issue when we copy mail from the “Send mail” folder to Exchange Unified Group.
Here the description:
User has mail in various subfolders in Outlook, we read them via Graph API and get MIME content of the mail via
[https://graph.microsoft.com/v1.0/users/user@mail.dk/messages/XXXXX/$value ](https://graph.microsoft.com/v1.0/users/user@mail.dk/messages/XXXXX/%24value)
then we use EWS to save these MINE file to Exchange (Unified Group)
We have a single problem when we copy mail from sent-item, here we do not get sendDateTime for the mail.
Is that in a way Aspose.Email can help us?
Regards
Reza Matin
@rezamatin
Can you please share the requirements in the form of sample MSG file and snapshot so that we may assist you further. Please also provide the sample code that you are using on your end.
Stream mailStream= await graphClient.Me.Messages[mailID].Content.Request().GetAsync();
var ewsClient = new ExchangeService()
…
Mailbox _Mailbox = new Mailbox(GroupSmtpAddress);
FolderId _Inbox = new FolderId(WellKnownFolderName.Inbox, _Mailbox);
byte[] mime = new byte[mailStream.Length];
await mailStream.ReadAsync(mime, 0, (int)mailStream.Length);
EmailMessage email = new EmailMessage(ewsClient);
ExtendedPropertyDefinition PR_MESSAGE_FLAGS_msgflag_read = new ExtendedPropertyDefinition(3591, MapiPropertyType.Integer);
email.SetExtendedProperty(PR_MESSAGE_FLAGS_msgflag_read, 1);
email.MimeContent = new Microsoft.Exchange.WebServices.Data.MimeContent(“UTF-8”, mime);
await email.Save(_Inbox);
MIME.pdf (84.0 KB)
problem is in my MIME file, missing date. I’m attaching MIME.elm, file before I’m saving it to Group-mail.
@rezamatin
I have created a ticket with ID EMAILNET-40044 in our issue tracking system to further investigate this on our end as it seems to be an issue related to API while fetching Send-Date. This thread has been linked with the API so that you may be notified once the issue will be addressed.