creating a true hyperlink href= in an email body dynamically

Discussion in 'ASP .Net' started by Paul, Aug 21, 2008.

  1. Paul

    Paul Guest

    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.
    Paul, Aug 21, 2008
    #1
    1. Advertising

  2. Paul

    Hans Kesting Guest

    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
    Hans Kesting, Aug 22, 2008
    #2
    1. Advertising

  3. Paul

    Paul Guest

    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
    >
    >
    >
    Paul, Aug 26, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dan Morrissey

    Creating HTML Email Body using MailTo tag

    Dan Morrissey, Jul 9, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    820
    Dan Morrissey
    Jul 9, 2003
  2. CRON
    Replies:
    24
    Views:
    200,707
    Adrienne Boswell
    Jun 20, 2006
  3. bdb112
    Replies:
    45
    Views:
    1,341
    jazbees
    Apr 29, 2009
  4. Ken
    Replies:
    1
    Views:
    371
    Alvin Bruney
    Aug 16, 2003
  5. Beefminator

    CDOSYS email - create hyperlink in body?

    Beefminator, Aug 31, 2006, in forum: ASP General
    Replies:
    6
    Views:
    186
    Beefminator
    Sep 2, 2006
Loading...

Share This Page