473,397 Members | 2,116 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

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
2 2218
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: matthiasjanes | last post by:
Hi, Maybe someone of you can help me. I'm trying to display an image in memory(open file) with an cgi script - but it want work proberly: I'm running an Cgi webserver (CgiServerGui.py). ...
16
by: Donjuan | last post by:
Hi all I have trouble with tracking whether my image file is loaded. i use DHTML to change my image. HERE is the code: <img name="someimage" src="1.jpg"...
17
by: santel_helvis | last post by:
Hi All, Could anyone tell me how to rotate the image in javascript. Which concepts I should concentrate to rotate the image
2
by: Eugene Anthony | last post by:
I am having a problem with this code. The problem I am facing is that the first image is displayed in its original size. But when I click the next button, the next image not displayed in its...
4
by: tshad | last post by:
I am trying to set up an Image authorization where you type in the value that is in a picture to log on to our site. I found a program that is supposed to do it, but it doesn't seem to work. ...
0
by: Iain | last post by:
Hi I am using Borland Developer 2006, C# web application. Fairly new to the .net platform and very new to repeaters. I have 2 repeaters on a page, both of which are filled from a database....
7
by: jzieba | last post by:
I found the following script that changes the text based on a user selection. I want to modify the code to change an image source based on the user selection. I have been told I can do this with...
1
by: sravani1 | last post by:
This code runs like when i submit the form it takes the image and displayed and top of the image a map will displayed. But actually i want that when i give the image it checks the location in the map...
7
by: hsegoy1979 | last post by:
Dear All Iam using file upload control and i want to display image in another pop up page .But image is not displaying in image control iam sending image path thru querystring . here is my code ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.