Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

email with embedded image

Posted on 2011-09-07
6
Medium Priority
?
280 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 75

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 75

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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 2000 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 75

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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

810 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