Email an image

  • Thread starter Thread starter Guest
  • Start date Start date
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>";
 
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
 
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 ?
 
Back
Top