Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / September 2007

Tip: Looking for answers? Try searching our database.

Email an image

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dave - 01 Sep 2007 01:02 GMT
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>";

Signature

L. A. Jones

Dave - 01 Sep 2007 01:16 GMT
Correction, it is the image that is grayed out only.
Signature

L. A. Jones

> 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.
[quoted text clipped - 4 lines]
> message.Body = "<html><body><img src=cid:\"~/Images/logo.jpg\" alt=\" Logo\"
> width=\"294\" height=\"226\"/></body></html>";
Patrice - 03 Sep 2007 13:10 GMT
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 ?

--
Patrice

> Correction, it is the image that is grayed out only.
>
[quoted text clipped - 8 lines]
>> Logo\"
>> width=\"294\" height=\"226\"/></body></html>";
Hans Kesting - 03 Sep 2007 12:06 GMT
> 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
[quoted text clipped - 4 lines]
> 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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.