email with embedded image

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
R8VIAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
käµfm³d 👽Connect With a Mentor Commented:
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
 
käµfm³d 👽Commented:
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
 
käµfm³d 👽Commented:
Escape the quote following ".com"...  I forgot to escape it  : \
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
R8VIAuthor Commented:
Hi,

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

Thanks,

R8VI
0
 
R8VIAuthor Commented:
Hi,

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

Thanks,

R8VI
0
 
käµfm³d 👽Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.