none
Strange behaviour seen while using 'EmbeddedMessage' property of Microsoft.Exchange.Data.Transport.Email.Attachment object RRS feed

  • Question

  • Background:

    This is a Technical Query related to property of "Microsoft.Exchange.Data.Transport.Email.Attachment" class.

    So here I am writing a code where in I am just checking the "EmbededMessage" property of above class due to which I am not able to receive the attachment.

    Details:

    Exchange 2010. The problem occurs only for the sample email that I have (I am not sure how do I attach it here) this is signed email having 2 attachments 1 xml and other .eml message(this has image as attachment).

    So the code is like:

    {..

    while (attachmentEnumerator != null && attachmentEnumerator.MoveNext())
                {
                    Microsoft.Exchange.Data.Transport.Email.Attachment attachment = attachmentEnumerator.Current;

    if(null != attachment.EmbeddedMessage)

    ..}

    if I comment out the code "//if(null != attachment.EmbeddedMessage)" I am able to receive entire email

    but as soon as I remove the comment, the attachment (.eml) is received as blank (without image)..

    The answer I am trying to find out here is: I am just checking the value here i.e I am neither setting or modifying the value, than what should cause this to delete the attachment?

    I have tested this on exchange 2007 it works perfect i.e. above issue is not observed.

    If we pass the attachment .eml message separately we receive it without any problem.

    Can anyone please help me, also let me kwow if you need any more information.. As I am new to forum I dont know exact information required

    ThankS!

    Tuesday, March 5, 2013 3:45 PM