Image displayed on email's body

  • Thread starter Fabio Negri Cicotti [MCP]
  • Start date
F

Fabio Negri Cicotti [MCP]

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 = "(e-mail address removed)";
Email.To = "(e-mail address removed)";
Email.Subject = "Blablabla blabla";
Email.Body = "<img src='logo_email.jpg'>";

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


Regards,
 
F

Fabio Negri Cicotti [MCP]

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.
 
P

Peter Kron

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 said:
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.
 

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top