Email an image

G

Guest

I sent an email with an embedded image, but when I view the email, the
message is grayed. I'm unsure if it is my email provider that is blocking it.
Here is the mark up

message.IsBodyHtml = true;

message.Body = "<html><body><img src=cid:\"~/Images/logo.jpg\" alt=\" Logo\"
width=\"294\" height=\"226\"/></body></html>";
 
H

Hans Kesting

I sent an email with an embedded image, but when I view the email, the
message is grayed. I'm unsure if it is my email provider that is
blocking it. Here is the mark up

message.IsBodyHtml = true;

message.Body = "<html><body><img src=cid:\"~/Images/logo.jpg\" alt=\"
Logo\" width=\"294\" height=\"226\"/></body></html>";

I suspect it's the use of a pathlike name in the "cid". Try specifying it
without
the "~/Images/" part.
How are you building that e-mail in your code?

Where are you viewing that e-mail? A local client (outlook (express), thunderbird,
...)
or some webmail?


Hans Kesting
 
P

Patrice

Check rather the HTML result. May understand is that you'll get
cid:~/Images/logo.jpg wbut Im' not sure this is the id you thought to use
(in particular the ~character) ?

Also some clients are blocking images by default (some cold perhaps not
check if this is an internal resource or not and block anyway). What is your
mail client ?
 

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