Hi,
I am saving emails from exchange using the MailMessage.Save() method, I am saving to .msg format.
If an email is sent on behalf of someone else, when I open the saved email in Outlook, I can't see the 'on behalf of' info at the top of the message.
If I save as .eml, I can see this.
If I save the email via Outlook I can also see the info.
Here is the code I am using:-
Sub SaveEmail(id As String)
Dim email As Microsoft.Exchange.WebServices.Data.EmailMessage = Microsoft.Exchange.WebServices.Data.EmailMessage.Bind(_service, id)
email.Load(New Microsoft.Exchange.WebServices.Data.PropertySet(Microsoft.Exchange.WebServices.Data.BasePropertySet.FirstClassProperties, _
Microsoft.Exchange.WebServices.Data.EmailMessageSchema.MimeContent))
Using ms = New MemoryStream(email.MimeContent.Content)
Dim msg As Aspose.Email.Mail.MailMessage = Aspose.Email.Mail.MailMessage.Load(ms)
' this does not save the 'on behalf of' information.
msg.Save(Path.GetTempPath & "test.msg", Aspose.Email.Mail.MessageFormat.Msg)
' this does.
msg.Save(Path.GetTempPath & "test.eml", Aspose.Email.Mail.MessageFormat.Eml)
End Using
End Sub
Am I doing something wrong?
Thanks in advance.