0

I have a small problem, maybe you guys know how to avoid it.

                system.IO.StreamReader text = new System.IO.StreamReader(to the html path);
                while ((line = text.ReadLine()) != null)
                {
                     newMail.HTMLBody += line
                }

When I open html file directly from its folder where html file is,byclicking 2 times on it, All images are opened correctly, because browsers (like IE) threats a folder with the html as a root folder.

The problem appears when I try to put some html into outlook with code above.
Outlook doesn't know that images are in other root folder with html file, so it doesn't open them...I need to modify the html code and and a whole path to any image file in it.
for example - it doesn't work:

<img src="logo.jpg" width="700" height="118" alt="Logo" longdesc="Logo" /></p>

That one works:

<img src="d:\htmls\web1\logo.jpg" width="700" height="118" alt="Logo" longdesc="Logo" /></p>

And the question is.
How to make my program think that path to html, its also path to all images used in that html?
To make it think like IE - you open html file somewhere, and IE knows that img files are also at the same dir with html file.

Thank you in advance!.

2
Contributors
2
Replies
3
Views
4 Years
Discussion Span
Last Post by VasquezPL
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.