MapiMessage.SenderEmailAddress in exchange server format for sent items

I am using your “FileDropTargetManager” to process an email dropped on my application from MS Outlook. This works well for messages in the inbox, but when the message is dragged from the sent items folder the MapiMessage.SenderEmailAddress is returned in exchange server format instead of the smtp email address.


For example, the SenderEmailAddress returns this: “/O=FIRST ORGANIZATION/OU=EXCHANGE ADMINISTRATIVE GROUP (FYDIBOHF23SPDLT)/CN=RECIPIENTS/CN=USERNAME”

When it should return: username@mydomain.com (I have substituted the real user name with USERNAME)

I have seen a similar bug fix for this (NETWORKNET-22226) but this was resolved in version 6.0.0 and I am using 6.6.0. Maybe this is the same bug, but was never fixed for emails sent by the current exchange user?

I have been able to reproduce this at 3 different sites so far. I checked the version at one and they are using Outlook 2007 SP2 (12.0.6557.5001) and exchange 8.2.301.0. The other customer has reported they are using: “Microsoft Outlook 2003
SP3, and the MS Exchange is Small Business Server
(2003)”.

Hi,

Thank you for inquiry.

I have reproduced the issue (ID: 31077) and logged this bug. We will look into it and will inform you when it gets fixed. Sorry for the inconvenience.

The issues you have found earlier (filed as 31077 ) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(1)

I just updated my test project to use the latest Aspose.Email (1.1.0) and Aspose.Network (6.9.0) and unfortunately this problem has not been fixed. I am still seeing the exact same behaviour as described in my original post.


This is very disappointing as I have several big customers waiting for a fix on this bug and now I’m going to have to tell them they have to wait at least until your next release. Are you aware of anything I can do to work-around this in the meantime?

Can I please get a response on this issue? The identified bug has not been fixed in the latest version and I need a solution.

Hi,

We are sorry for the inconvenience, this bug will be resolved in the next version.

My problem is that I need to provide some sort of workaround within a week, so waiting for the next release is not going to be an option for me. Is there anything in the email library that I can use to translate an address in exchange format to smtp format.


Currently I am using the following directory services code which works in certain circumstances, but not always, and I can’t make it reliable. I assume you are doing something like this in your code, so hopefully you can help me out.

Imports System.Net.Mail
Imports System.DirectoryServices

Public Shared Function GetExchangeAddress(ByVal exAddr As String) As String
Dim result As String = “”
Try
'exAddr = “/O=FIRST ORGANIZATION/OU=EXCHANGE ADMINISTRATIVE GROUP (FYDIBOHF23SPDLT)/CN=RECIPIENTS/CN=UserName”
exAddr = String.Format("(legacyExchangeDN={0})", exAddr)
Dim entry As New DirectoryEntry()
Dim searcher As New DirectorySearcher(entry, exAddr)
Dim sr As SearchResult = searcher.FindOne()
If sr IsNot Nothing Then
result = sr.Properties(“mail”)(0).ToString
End If
Catch ex As System.Exception
End Try
Return result
End Function

Hi,


We will try our best to release a hotfix for you on/before Nov 17.
Hi,

Please try the following workaround for this issue:

MapiMessage message = MapiMessage.FromStream(output); // get from disk, stream or drag drop
foreach (MapiNamedProperty namedProperty in message.NamedProperties.Values)
{
if (namedProperty.Oom == "InetAcctName")
{
senderEmail = namedProperty.GetString();
}
}

I tried the suggested workaround and it does not work. Actually I inspected all the named properties and none of them contain the SMTP address. So no solution there.


Also, it is now a week passed the date you said you would provide a hotfix but I don’t see anything in the downloads. Can you provide an update on this please?

Hi,


Could you please post a sample message in MSG format for our analysis? You may directly drag a message from the Outlook’s “Sent Items” to any folder in disk and send us.

I checked with Aspose.Email 1.1 with Outlook 2010 (connected to Exchange 2010) on Win7 and the workaround got the address in SMTP format.

I have attached the msg file as requested but I doubt this will be useful in reproducing the error. I say this because I tried inspecting this file myself on another machine (not connected to the original domain) and I can see the sender’s email address in SMTP format. I suspect that Outlook has performed the address translation when the email was dropped on the folder.


I have also attached a screen capture from a test utility I created to try to resolve this problem. It clearly illustrates the problem in the SenderEmailAddress returned from your product when this same message is dropped on my test app.

Anyway, I now have a lot of different sites complaining about this problem, with different versions of Outlook and Exchange, so it’s not an isolated problem. The ability to drag and drop emails from Outlook onto our application was one of the main reasons I purchased your product and it’s not looking like I made a very good decision right now.

Hi,


We are sorry for your inconvenience.

Thank you for the sample file, we are currently working on it. Meanwhile, can you please test your requirement with latest version of Aspose.Email for .NET v1.2 and post your results here.

Regards,

I just repeated the test using the latest release of Aspose.Email (1.2.0) and the results were exactly the same as with 1.1.

Hi,

Sorry to know that latest version isn't helping you, also none of our provided workarounds are working on your end. For some reason these workarounds are working on our side.

I have reopened the ticket associated with this issue and attached your provided sample files with it. Also I have requested development team to look into this matter on urgent basis.

Hi,


It took a while to investigate this issue and we apologize for this delay.

We have concluded that if the message does not contain the sender email address in SMTP format then we can only extract this information by using either Directory Services or by Outlook Object Model.

Attached to my reply is a sample application using the Outlook Object Model and Aspose.Email for .NET v1.3.0. I have verified that if I drag and drop any message from “Sent Items” of Outlook 2010, I can get the sender email address in SMTP format.

Please note that, to successfully execute the sample application the Outlook should be necessarily connected to Exchange Server and the message sender should be the user of this Exchange.

Regards,