none
Embedded attachments are destroyed after custom text is added into email RRS feed

  • Question

  • Hi,

    we have problem with destroyed embedded attachments after we add our custom metadata into email. The metadata are added by this code:

    _mail.HTMLBody += string.Format("<html><body><br/><br/><hr/>{0}{1}{2}{3}</body></html>",DoNotRemoveString, MetadataStartString, _encryptedMetadata, MetadataEndString);

    We don´t have problems with any other email only with those with embedded attachments. After metadata are added, embedded attachment dissappear from email and I can see it as a standard attachment with title "Picture (Device Independent Bitmap)"

    Do you know if this even possible to do it that way?

    Thanks,

    Karel

    Monday, April 15, 2013 11:20 AM

Answers

  • Actually, HTML supports embedded attachments, they just have to be referenced correctly.
     
    I would assume that before the modification of the body that there is a tag such as this:
     
        img  src="cid:image001.png@01CD1D63.A901D5D0"
     
    That would reference an attachment with that content id, which is how Outlook identifies the inline attachment. If that is removed the attachment will not display in the email body and will just be a normal attached image.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "DamianD" <=?utf-8?B?RGFtaWFuRA==?=> wrote in message news:3eebfead-407b-4d90-abc2-83e45ade5c5c...

    by embedded do you mean RTF body format? - if so, this is to be expected - when you set htmlbody, Outlook switches to html body format and only RTF supportes 'inline' attachments, so all such attachments are converted to 'standard' ones.


    Ken Slovak MVP - Outlook
    Tuesday, April 16, 2013 2:57 PM
    Moderator

All replies

  • by embedded do you mean RTF body format? - if so, this is to be expected - when you set htmlbody, Outlook switches to html body format and only RTF supportes 'inline' attachments, so all such attachments are converted to 'standard' ones.

    Monday, April 15, 2013 12:05 PM
  • Actually, HTML supports embedded attachments, they just have to be referenced correctly.
     
    I would assume that before the modification of the body that there is a tag such as this:
     
        img  src="cid:image001.png@01CD1D63.A901D5D0"
     
    That would reference an attachment with that content id, which is how Outlook identifies the inline attachment. If that is removed the attachment will not display in the email body and will just be a normal attached image.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "DamianD" <=?utf-8?B?RGFtaWFuRA==?=> wrote in message news:3eebfead-407b-4d90-abc2-83e45ade5c5c...

    by embedded do you mean RTF body format? - if so, this is to be expected - when you set htmlbody, Outlook switches to html body format and only RTF supportes 'inline' attachments, so all such attachments are converted to 'standard' ones.


    Ken Slovak MVP - Outlook
    Tuesday, April 16, 2013 2:57 PM
    Moderator