Email html page with images

G

Guest

Hi,

I'm trying to email html page & that page also contains the images. I can
do that when we send html page from ms outlook. But I want to attach page c#
code & send the mail through smtp mail.

Thanx in advance..

Regards,

das
 
N

Nicholas Paldino [.NET/C# MVP]

While that certainly is an option, it's a problem, since you will have
to host those images. It would be easier to just embed the images in the
email itself.

This article shows how to do that. It will have to be tweaked for
however he is sending the email, but it should give the basic idea.

http://www.codeproject.com/csharp/EmbedEmailImages.asp

Hope this helps.
 
C

carion1

Mail server admins around the world love this! Embedding images in the
message is an option but IMO it is a bad one.

--

Derek Davis
(e-mail address removed)

Nicholas Paldino said:
While that certainly is an option, it's a problem, since you will have
to host those images. It would be easier to just embed the images in the
email itself.

This article shows how to do that. It will have to be tweaked for
however he is sending the email, but it should give the basic idea.

http://www.codeproject.com/csharp/EmbedEmailImages.asp

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

carion1 said:
Place the images on a web server and then...

<img
src="http://www.whateverdomainyouuse.com/some_directory/some_image.jpg"
border="0">
 
N

Nicholas Paldino [.NET/C# MVP]

Why?

The idea is to send a self contained piece of information to the client
which is not dependent on anything outside of the email.

It's actually better than storing the images on your server, since now,
downloadable content in emails is pretty much nixed by any respectable email
client (in order to prevent spam emails from verifying email addresses).

Also, from the mail admin's point of view, it's an extra piece of
information flying through the system. I don't see why they should care
that much (if they are on the receiving end).

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

carion1 said:
Mail server admins around the world love this! Embedding images in the
message is an option but IMO it is a bad one.

--

Derek Davis
(e-mail address removed)

Nicholas Paldino said:
While that certainly is an option, it's a problem, since you will have
to host those images. It would be easier to just embed the images in the
email itself.

This article shows how to do that. It will have to be tweaked for
however he is sending the email, but it should give the basic idea.

http://www.codeproject.com/csharp/EmbedEmailImages.asp

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

carion1 said:
Place the images on a web server and then...

<img
src="http://www.whateverdomainyouuse.com/some_directory/some_image.jpg"
border="0">

--

Derek Davis
(e-mail address removed)

Hi,

I'm trying to email html page & that page also contains the images. I
can
do that when we send html page from ms outlook. But I want to attach
page c#
code & send the mail through smtp mail.

Thanx in advance..

Regards,

das
 
C

carion1

That 20k message is now much bigger. Mail servers are bloated enough. I
completely understand the advantage of this to the programmer (spammer).
Yes, most mail clients will block the external content but they also allow
you to view it if you want. This is just my opinion based on my situation
(exchange is part of my responsibility).

--

Derek Davis
(e-mail address removed)

Nicholas Paldino said:
Why?

The idea is to send a self contained piece of information to the client
which is not dependent on anything outside of the email.

It's actually better than storing the images on your server, since now,
downloadable content in emails is pretty much nixed by any respectable
email client (in order to prevent spam emails from verifying email
addresses).

Also, from the mail admin's point of view, it's an extra piece of
information flying through the system. I don't see why they should care
that much (if they are on the receiving end).

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

carion1 said:
Mail server admins around the world love this! Embedding images in the
message is an option but IMO it is a bad one.

--

Derek Davis
(e-mail address removed)

Nicholas Paldino said:
While that certainly is an option, it's a problem, since you will
have to host those images. It would be easier to just embed the images
in the email itself.

This article shows how to do that. It will have to be tweaked for
however he is sending the email, but it should give the basic idea.

http://www.codeproject.com/csharp/EmbedEmailImages.asp

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Place the images on a web server and then...

<img
src="http://www.whateverdomainyouuse.com/some_directory/some_image.jpg"
border="0">

--

Derek Davis
(e-mail address removed)

Hi,

I'm trying to email html page & that page also contains the images. I
can
do that when we send html page from ms outlook. But I want to attach
page c#
code & send the mail through smtp mail.

Thanx in advance..

Regards,

das
 

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