Solved

email with embedded image

Posted on 2011-09-07
6
225 Views
Last Modified: 2012-05-12
Hi,

I am following this tutorial

http://www.codedigest.com/Articles/ASPNET/14_Email_with_Embedded_image_in_ASPNet_20.aspx

What I want to do is link my image to a website so if someone clicks the image then it goes to a website.

How can I do this please help

Thanks,

R8VI
0
Comment
Question by:R8VI
  • 4
  • 2
6 Comments
 
LVL 74

Expert Comment

by:käµfm³d 👽
ID: 36498848
Try modifying this line:

string Body = "<b>Welcome to popfly!!</b><br><img alt=\"\" hspace=0 src=\"cid:imageId\" align=baseline border=0 >";

Open in new window


to something along the lines of:

string Body = "<b>Welcome to popfly!!</b><br><a href=\"http://your-server-address.com"><img alt=\"\" hspace=0 src=\"cid:imageId\" align=baseline border=0 ></a>";

Open in new window


Alter "http://your-server-address.com" accordingly.
0
 
LVL 74

Expert Comment

by:käµfm³d 👽
ID: 36498851
Escape the quote following ".com"...  I forgot to escape it  : \
0
 

Author Comment

by:R8VI
ID: 36498868
Hi,

Thanks for this what do you mean by Escape the quote following .com

Thanks,

R8VI
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 74

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 36498944
Thanks for this what do you mean by Escape the quote following .com
Put a backslash before it... like I did with the quote before "http://", or like the author did with the quotes after "img alt=" or "src=".

Here's the corrected version:

string Body = "<b>Welcome to popfly!!</b><br><a href=\"http://your-server-address.com\"><img alt=\"\" hspace=0 src=\"cid:imageId\" align=baseline border=0 ></a>";

Open in new window

0
 

Author Comment

by:R8VI
ID: 36499180
Hi,

Thanks for this but the image does not appear on the phone, will this always be the case ?

Thanks,

R8VI
0
 
LVL 74

Expert Comment

by:käµfm³d 👽
ID: 36499192
Thanks for this but the image does not appear on the phone, will this always be the case ?
I do not know the answer to that, I'm afraid. I can only suggest trying to send an email to an account which you can check from a computer and see if the image displays. I've never used the code that you posted; I'm only offering what seems a logical modification.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now