Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > creating a true hyperlink href= in an email body dynamically

Reply
Thread Tools

creating a true hyperlink href= in an email body dynamically

 
 
Paul
Guest
Posts: n/a
 
      08-21-2008
Hi,
I am creating emails dynamically using C# and would like to place a
hyperlink in the email body before sending it out. I added the text for what
I thought was a hyperlink but the email just shows the entire text including
the navigation URL where I would like it to show up as a clickable link but
only display the portion of the hyperlink that it is supposed to.
I am using microsoft Office 2007 and VS2005.
Thanks.
--
Paul G
Software engineer.
 
Reply With Quote
 
 
 
 
Hans Kesting
Guest
Posts: n/a
 
      08-22-2008
Paul pretended :
> Hi,
> I am creating emails dynamically using C# and would like to place a
> hyperlink in the email body before sending it out. I added the text for what
> I thought was a hyperlink but the email just shows the entire text including
> the navigation URL where I would like it to show up as a clickable link but
> only display the portion of the hyperlink that it is supposed to.
> I am using microsoft Office 2007 and VS2005.
> Thanks.


What is the format of the mail body? If it is set to "text" (which is
the default) then html wouldn't work. You need to set the type to
"html" and provide an html text (which can include a <a href=...>)

Set System.Net.MailMessage.IsBodyHtml to true

Hans Kesting


 
Reply With Quote
 
 
 
 
Paul
Guest
Posts: n/a
 
      08-26-2008
Thanks for the response, I think the email mode is currently text, will try
to set it to html as suggested.
--
Paul G
Software engineer.


"Hans Kesting" wrote:

> Paul pretended :
> > Hi,
> > I am creating emails dynamically using C# and would like to place a
> > hyperlink in the email body before sending it out. I added the text for what
> > I thought was a hyperlink but the email just shows the entire text including
> > the navigation URL where I would like it to show up as a clickable link but
> > only display the portion of the hyperlink that it is supposed to.
> > I am using microsoft Office 2007 and VS2005.
> > Thanks.

>
> What is the format of the mail body? If it is set to "text" (which is
> the default) then html wouldn't work. You need to set the type to
> "html" and provide an html text (which can include a <a href=...>)
>
> Set System.Net.MailMessage.IsBodyHtml to true
>
> Hans Kesting
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[False,True] and [True,True] --> [True, True]????? bdb112 Python 45 04-29-2009 02:35 AM
To reduce your body weight & slim your body Loss weight MCSA 0 07-21-2007 05:15 AM
CDOSYS email - create hyperlink in body? Beefminator ASP General 6 09-02-2006 02:28 PM
Dynamically Hyperlink and Event Handler for the Hyperlink ? Ken ASP .Net Datagrid Control 1 08-15-2003 11:38 PM
Creating HTML Email Body using MailTo tag Dan Morrissey ASP .Net 0 07-09-2003 05:56 PM



Advertisments