Windows 7 - HTML format in eml file

Asked By Varun
28-Oct-09 06:59 AM
CDOEX IMessage interface provides function to create eml file
IMessage->Stream->SaveToFile
If there is a mail which has an embeded image in its body and if i save
create eml file for this mail using IMessage->Stream->SaveToFile then embeded
image will not display in body of eml file. Eml file will show it as
attachment.
Is there any option to show it in mail body when open eml file.

I found we need to convert mail format to html but dont know how.
Please suggest.
Outlook
(1)
AdSaveCreateOverWrite
(1)
AdFailIfNotExists
(1)
IDataSourcePtr
(1)
AdModeReadWrite
(1)
IMessagePtr
(1)
IDataSource
(1)
SaveToFile
(1)
  Dmitry Streblechenko replied to Varun
29-Oct-09 03:08 PM
How do you refer to the image in the HTML body?

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy  - Outlook, CDO
and MAPI Developer Tool
-
  Varun replied to Dmitry Streblechenko
30-Oct-09 03:13 AM
The same way how exchange server refer to.

For an exchange user, when a mail(which contains embeded image in body)
receive on exchange server, i open this mail using CDOEX IMessage and
IDataSource interfaces and create eml file using IMessage->Stream->SaveToFile.

IMessagePtr pMsg( __uuidof( Message ) );
IDataSourcePtr pDsrc = NULL;

USES_CONVERSION;
HRESULT hr = pMsg->get_DataSource(&pDsrc);
hr = pDsrc->Open(  "mailpath",
NULL,
adModeReadWrite,
adFailIfNotExists,
adOpenSource,
_bstr_t() , _bstr_t() );
pMsg->GetStream()->SaveToFile("c:/emlfilename.eml",adSaveCreateOverWrite);
  Dmitry Streblechenko replied to Varun
30-Oct-09 12:33 PM
No, I mean how do you refer to the image in the HTML body? What does <img>
tag look like?

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy  - Outlook, CDO
and MAPI Developer Tool
-
  Dmitry Streblechenko replied to Varun
02-Nov-09 03:27 PM
What exactly do you mean by the following? You msu tinclude an atatchment if
yo urefer to it in the HTML body.


But i send a mail without attachment and insert a picture in body using rich
text mail format, when mail arrives on exchange server i create its eml file
but this eml file does not contains any picture not in body not as
attachment.
What to do for that case?

-->

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy  - Outlook, CDO
and MAPI Developer Tool
-
  ashish replied to Dmitry Streblechenko
02-Nov-09 04:57 PM
Here my question was when i send a mail with image in body using html
format, i receive mail on exchange server and create its eml file using
CDOEX IMessage interface but eml file does not show image in body. It shows
image as attachment. You asked me to show IMG tag for image in htmlbody. I
found below img tag, and i am  expecting it is possible to show embeded image
in body of eml file when create eml file.
src=3D"cid:image001.jpg@01CA5A42.D2B24400">


Here i send a mail with image in body using rich text format and create eml
file for this mail then i do not find that image in eml file. Image does not
exist in eml file body or attachment. What to do to get image in eml file?
  varun replied to Dmitry Streblechenko
04-Nov-09 03:26 PM
If we create eml file using IMessage interface then embeded image displays
as attachment in eml file. please confirm IMessage provides no help to show
embeded image in body of eml when create eml file.

When we send mail using rich text format and we create eml file for this
mail using IMessage then embeded image does not save in eml file. Is there
any way to extract embeded image from mail using IMessage and save in eml
file.
  Dmitry Streblechenko replied to ashish
04-Nov-09 03:42 PM
Sorry, but I still do not understand what you mean.
How exactly do you create the EML file?
Again, all you need to do to make an image show up in the HTML body is to
1. Correctly reference the image in the HTML body using <img src="cid:...">
2. Make sure content id of the attachment isexactly as in (1)
3. Make sure teh attachemnmt is actually in teh EML file.

Which of the following 3 above is not satisfied in your case? *What* exactly
does not work?

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy  - Outlook, CDO
and MAPI Developer Tool
-
Create New Account
help
outlook / outlook express Windows 7 I am unable to print out from outlook or outlook express. I receive: A runtime error has occured. Do you wish to debug? Line 2020 Error unspecified. Can anyone help? BSM MSDN Discussions Regsvr32 (1) Outlook (1) Djcave1 (1) BSM (1) "BSM" wrote: I have the same exact problem I am using outlook express 6. need answer? I found solution!! after reading similar problems and answers. this is to START RUN typed regsvr32 ole32.dll pressed OK this corrected my printing problem!!! keywords: outlook / outlook, express description: I am unable to print out from outlook or outlook express. I receive
Repairing broken Outlook Express Windows 7 My Outlook Express is sending out email messages that are entirely blank, how can I fix this problem? Mail Discussions Outlook 2003 (1) Outlook 2007 (1) Outlook (1) Newsletter (1) Dailytips (1) Ol2007 (1) You need to post in an Outlook Express newsgroup. Outlook and Outlook Express are two different programs. disable email scanning by antivirus applications. If that doesn't
Transfer Contacts from Outlook Express to Outlook Windows 7 I've asked this question before but got no answer. Can you transfer contacts from Outlook Express to Outlook. I have a new mobile phone and it will only synchronise with Outlook and I use Outlook Express. Windows XP Basics Discussions Outlook (1) In Outlook you Import Contacts / Addresses from OE *But* in OE you Export mail to outlook Outlook
PROBLEM WITH MICROSOFT OFFICE OUTLOOK Windows 7 I have a problemopening my outlook. The error message is 'cannot open outlook window. The set of folders cannot be opened.Errors have been detected in the file c: \ users \ A1 \ AppData \ local \ microsoft \ outlook \ outlook.pst. Quit outlook and then use the inbox repair tool(scanpst.exe to disgnose & repair error in the online for solution. can any one please help provide the solution. Windows Vista Mail Discussions Outlook (1) MICROSOFT OFFICE OUTLOOK (1) Microsoft outlook (1) Inbox repair tool (1) Error message (1) If you really mean