467,145 Members | 1,004 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,145 developers. It's quick & easy.

Image displayed on email's body

Hi all.

How do I do to display a picture on e-mail's body when visualized using
Outlook Express?

I've set the properties bellow but till now I've got the image shown as that
box with a red "x" (when an image hasn't been downloaded) and the image goes
attached instead of displayed on the e-mail's body.

MailMessage Email = new MailMessage();
Email.Attachments.Add(new MailAttachment(Request.PhysicalApplicationPath +
@"images\logo_email.jpg"));
Email.BodyFormat = MailFormat.Html;
Email.From = "x@x.com";
Email.To = "y@y.com";
Email.Subject = "Blablabla blabla";
Email.Body = "<img src='logo_email.jpg'>";

SmtpMail.SmtpServer = "127.0.0.1";
SmtpMail.Send(Email);
Regards,

--
Fabio Negri Cicotti
Nov 18 '05 #1
  • viewed: 2053
Share:
2 Replies
Sometimes we try to get the hardest way, don't we? The answer comes up
naturaly after think how it works... if we are talking about HTML e-mail
format, why don't put whole URL into IMG tag?

I put

Email.Body = "<img src='http:\\www.somesite.com\images\logo_email.jpg '>";

and it worked out!
Thanks all anyway.

--
Fabio Negri Cicotti

"Fabio Negri Cicotti [MCP]" <ci*****@hotmail.com> wrote in message
news:e5**************@TK2MSFTNGP10.phx.gbl...
Hi all.

How do I do to display a picture on e-mail's body when visualized using
Outlook Express?

I've set the properties bellow but till now I've got the image shown as
that box with a red "x" (when an image hasn't been downloaded) and the
image goes attached instead of displayed on the e-mail's body.

MailMessage Email = new MailMessage();
Email.Attachments.Add(new MailAttachment(Request.PhysicalApplicationPath +
@"images\logo_email.jpg"));
Email.BodyFormat = MailFormat.Html;
Email.From = "x@x.com";
Email.To = "y@y.com";
Email.Subject = "Blablabla blabla";
Email.Body = "<img src='logo_email.jpg'>";

SmtpMail.SmtpServer = "127.0.0.1";
SmtpMail.Send(Email);
Regards,

--
Fabio Negri Cicotti

Nov 18 '05 #2
Note that using this approach will bring up the nag dialog about downloading
images from the web in OL 2003 and OE SP2.

If that's not acceptable, you can embed the image in the mail as a MIME
encoded message using CDO.

Peter Kron

"Fabio Negri Cicotti [MCP]" <ci*****@hotmail.com> wrote in message
news:ud***************@TK2MSFTNGP11.phx.gbl...
Sometimes we try to get the hardest way, don't we? The answer comes up
naturaly after think how it works... if we are talking about HTML e-mail
format, why don't put whole URL into IMG tag?

I put

Email.Body = "<img src='http:\\www.somesite.com\images\logo_email.jpg '>";

and it worked out!
Thanks all anyway.

--
Fabio Negri Cicotti

"Fabio Negri Cicotti [MCP]" <ci*****@hotmail.com> wrote in message
news:e5**************@TK2MSFTNGP10.phx.gbl...
Hi all.

How do I do to display a picture on e-mail's body when visualized using
Outlook Express?

I've set the properties bellow but till now I've got the image shown as
that box with a red "x" (when an image hasn't been downloaded) and the
image goes attached instead of displayed on the e-mail's body.

MailMessage Email = new MailMessage();
Email.Attachments.Add(new MailAttachment(Request.PhysicalApplicationPath
+ @"images\logo_email.jpg"));
Email.BodyFormat = MailFormat.Html;
Email.From = "x@x.com";
Email.To = "y@y.com";
Email.Subject = "Blablabla blabla";
Email.Body = "<img src='logo_email.jpg'>";

SmtpMail.SmtpServer = "127.0.0.1";
SmtpMail.Send(Email);
Regards,

--
Fabio Negri Cicotti


Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by matthiasjanes | last post: by
17 posts views Thread by santel_helvis@sify.com | last post: by
2 posts views Thread by Eugene Anthony | last post: by
4 posts views Thread by tshad | last post: by
reply views Thread by Iain | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.