creating a true hyperlink href= in an email body dynamically

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

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 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
 
Thanks for the response, I think the email mode is currently text, will try
to set it to html as suggested.
 
Back
Top