If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Exchange webmail application - read embedded images

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-23-08, 04:48
vashkenazy vashkenazy is offline
Registered User
 
Join Date: Jan 2008
Posts: 1
Exchange webmail application - read embedded images

Hello boys... I'm writing an application to manage Exchange Server mailboxes via web (asp platform).
I'm in trouble reading images embedded into html messages: in detail, when I try to print the htmlbody with

response.write(msgobj.HTMLBody)

I got a red 'X' if images are embedded. Everything ok if images are linked from the original server, obviously.

The full code is

-----------------------------------------------
set Conn= CreateObject("ADODB.Connection")
Conn.Provider = "ExOLEDB.DataSource"
set msgobj = createobject("CDO.Message")
set rec = createobject("ADODB.Record")

Conn.Open <path>,,,-1

const adModeReadWrite=3
Const adFailIfNotExists = -1
Const adOpenSource = &H00800000

rec.open <message_fullpath>, Conn, adModeReadWrite, adFailIfNotExists, adOpenSource
msgobj.datasource.openobject rec, "_Record"

response.write(msgobj.HTMLBody)
-----------------------------------------------

The problem seems to be that embedded images are SIMILAR to attachments, but the msgobj.attachments collection returns 0 items.
Embedded images are linked with a strange "cid:<filename>" url.
How can I display that images into HTML body?

Help please!!

Bye!

---------------
Andrea Gumirato
Bologna (Italy)
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On