Backround image not display in mail

Posted by Saravanan05 under ASP.NET on 1/27/2010 | Views : 2265 | Status : [Member] | Replies : 7
hi friends


<td style="background: url(http://localhost/images/main.jpg) no-repeat top left; width: 684px;>

In my html mail template,i have used above code for backround image,my problem is the backround image not display in gmail,yahoo,hotmail..etc

how can solve this?




Responses

Posted by: Raja on: 1/28/2010 [Member] Starter

Up
0
Down
Look for embedded image concept in email

http://www.codeproject.com/KB/aspnet/inkrajesh.aspx

http://aspalliance.com/1354_Sending_HTML_Mail_with_Embedded_Image_in_NET

Thanks

Regards,
Raja, USA

Saravanan05, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Abhi2434 on: 1/28/2010 [Member] [Microsoft_MVP] [MVP] Silver

Up
0
Down
Hey.. how can one detect local host automatically from external clients. OMG.

See my article here :
http://www.codeproject.com/KB/IP/Sending_Emails_From_GMAIL.aspx


I did embed an image with html similar to what you need.
Let me know if you need any further help.
Cheers.


www.abhisheksur.com

Saravanan05, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Nishithraj on: 1/28/2010 [Member] Bronze

Up
0
Down
I think you should replace localhost with the current path. you can give as follows through html

if it is resided in the images folder of root you can specify it as ../images/name of the picture

or you can use Server.Mappath

Mark this as answer, if it is.....

With regards
Nishithraj Narayanan

Saravanan05, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sagarp on: 1/29/2010 [Member] Bronze

Up
0
Down
try this




<td style="background-image: url(http://localhost/images/main.jpg) no-repeat top left; width: 684px;>

write css class


thanks
sagar

Thanks
SagarP
http://www.emanonsolutions.net
http://emanonsolutions.blogspot.com/

Saravanan05, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Abhi2434 on: 1/29/2010 [Member] [Microsoft_MVP] [MVP] Silver

Up
0
Down
Hey Sagarp, How could localhost be available from external site?

And also to Nishithraj,
Most of the mail client spam mails having external images embedded in it.

So it is better to embed rather than go for external image links.
:)

www.abhisheksur.com

Saravanan05, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sagarp on: 1/29/2010 [Member] Bronze

Up
0
Down
my code work in url( ) in url section write imge path anything

Thanks
SagarP
http://www.emanonsolutions.net
http://emanonsolutions.blogspot.com/

Saravanan05, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Abhi2434 on: 1/29/2010 [Member] [Microsoft_MVP] [MVP] Silver

Up
0
Down
But how about one if checks it from outlook?

The user will download the css, images etc. But the client doesnt knows what localhost is.

Just send a mail using url(localhost) and check it from another machine.. See if the image is coming correctly or not.



www.abhisheksur.com

Saravanan05, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response