Solved

email with embedded image

Posted on 2011-09-07
6
264 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Business Impact of IT Communications

What are the business impacts of how well businesses communicate during an IT incident? Targeting, speed, and transparency all matter. Find out more in this infographic.

 
LVL 75

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 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

734 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