How to get attachment if image is pasted in body itself.

V

Vinayakc

Hi,

I have one outlook add-in which reads the attachments of the mail and
save those on system.
I observed that, if we send mail in which image is pasted in body
itself then outlook object model api can not get any attachment.
We can see the image in body and we can also save that image but we can
not get attachment programatically.

Can anyone please help me on this?

Thanks and regards,
Vinayakc
 
D

Dmitry Streblechenko

Did you look at the HTMLBody property? How is the background image
referenced? Is it through an external url or through cid?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
V

Vinayakc

Hi Dmitry,

You are right.
The background image is referenced through "cid" in HTML body of that
mail.
for eg:
"cid:[email protected]"

Will this help me? how?

Reagrds
Vinayakc
 
D

Dmitry Streblechenko

"cid" protocol means that the image is really one of the message attachments
(which Outlook Object Model will hide if PR_ATTACHMENT_HIDDEN = true).
You will need to find the attachment with the same value of
PR_ATTACH_CONTENT_ID as the value of the cid in the HTML - look at a message
with OutlookSpy (click IMessage, go to the GetAttachmentTable tab).
OOM won't let you access these properties, so the usual suspects are to the
rescue - Extended MAPI, CDO 1.21 or Redemption.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top