[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 283
  • Last Modified:

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
0
R8VI
Asked:
R8VI
  • 4
  • 2
1 Solution
 
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
 
R8VIAuthor Commented:
Hi,

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

Thanks,

R8VI
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
käµfm³d 👽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
 
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

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now