We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

AsposePanel - MapiMessageReader - Find Sender EmailId

Using AsposePanel control to drag and drop an outlook email to a temp file and using Aspose MapiMessageReader, to read the same email from a temp file, we cant see the senders email address. MapiMessage.SenderEmailAddress gives only the name(first name, last name) but not the email ID indeed. Can anyone help me how to get the senders EMAILID. This is especially when the sender is already a domain user, where in we see only the name in the out look and not the complete email. Thanks,Arif.


void _uiAsposePanel_DragDrop( object sender, DragEventArgs e )
{
FileDragEventArgs args = e as FileDragEventArgs;
if ( args != null && args.Files.Count > 0 )
{
using ( FileStream output = new System.IO.FileStream( “c:\Tempfile.Msg”, System.IO.FileMode.CreateNew ) )
{
args.Files[ 0 ].Save( output );

MapiMessage message = new MapiMessage();
using ( MapiMessageReader mr = new MapiMessageReader( “c:\Tempfile.Msg”) )
{
message = mr.ReadMessage();
// I cannot get the from email address. I can only see the Sender name, like we see in outlook but cannot see the email address indeed
}

}
}
}

Hi Arif,


Thanks for considering Aspose.

Could you please attach a sample MSG file for our testing?

If the MSG is saved from a mailbox, that is connected to a non-Exchange Server e.g. Pop3 or Imap server, it should show
  • Sender’s name in MapiMessage.SenderName property
  • Sender’s email address in MapiMessage.SenderEmailAddress property
However, in case, if the Outlook mailbox is connected to the Exchange Server, it currently shows
  • Sender’s name in MapiMessage.SenderName property
  • Sender’s email address in Exchange format in MapiMessage.SenderEmailAddress property e.g. "/O=FIRST ORGANIZATION/OU=EXCHANGE ADMINISTRATIVE GROUP (FYDIBOHF23SPDLT)/CN=RECIPIENTS/CN=ADMINISTRATOR"
I have logged an issue for displaying the Smtp address for Exchange mailbox messages (ID: 18989). We will look into it and will inform you when it gets fixed. Sorry for the inconvenience.

Hi razzaq,

Thanks for the response. As said, it doesnt show the emailId but only the name in exchange format. It is not that useful when one wants to log audit of emailIDs.

Just relying in exchange format might not help, as the developed product can be installed by different organisation having their own exchange server, it is hard to append the domain address in the last.

It would be very handy if we can have the full emailAddress of the Outlook exchange sender rather than in exchange format.

Thanks,

Arif