PC Review


Reply
Thread Tools Rate Thread

creating a true hyperlink href= in an email body dynamically

 
 
Paul
Guest
Posts: n/a
 
      21st Aug 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
 
      22nd Aug 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
 
      26th Aug 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
Rate This Thread
Rate This Thread:

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
Hyperlink in body of VBA email Chadersmith Microsoft Excel Misc 1 17th Sep 2009 07:46 PM
hyperlink in body of Email =?Utf-8?B?Sm9u?= Microsoft Outlook Discussion 7 15th Aug 2007 04:46 PM
odd link in email message body <A href="http://0000000000330 =?Utf-8?B?VGhlIEpvYiBEci4=?= Microsoft Outlook Discussion 0 1st May 2007 04:21 AM
Hyperlink in the body of email Danie7 Microsoft Outlook Form Programming 1 6th Aug 2005 05:46 AM
adding form fields to the body of an email re: href="mailto" John Hargrove Microsoft Access Form Coding 0 17th Mar 2004 09:30 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:46 PM.