Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. mailto - How to insert a URL hyperlink in the Body with DisplayText

mailto - How to insert a URL hyperlink in the Body with DisplayText

Scheduled Pinned Locked Moved Web Development
javascriptcomtutorialquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SarahMcM
    wrote on last edited by
    #1

    Hi, I am using Javascript to open up the default mail client and start an email eg string mailto = "mailto:?Subject=Link to your order&Body=Here is the link to your order" + Request.Url.ToString() + "?Id=323498; ScriptManager.RegisterStartupScript(UpdatePanel1, typeof(string), "mailto", "window.open('" + (mailto) + "');", true); This works well and I get an email sent through with the hyperlink visible (and clickable - yay!) What I want to do however is to provide Display Text for the hyperlink so that whilst the underlying URL is eg http://www.google.com?id=323498 the text visible to the recipient is Your Link or something appropriate. So it is the same concept as in Outlook when you Insert Hyperlink, you provide the Address but you can also provide Text to Display. (Same in GMail etc). Any ideas how to achieve this? Thanks!!

    C 1 Reply Last reply
    0
    • S SarahMcM

      Hi, I am using Javascript to open up the default mail client and start an email eg string mailto = "mailto:?Subject=Link to your order&Body=Here is the link to your order" + Request.Url.ToString() + "?Id=323498; ScriptManager.RegisterStartupScript(UpdatePanel1, typeof(string), "mailto", "window.open('" + (mailto) + "');", true); This works well and I get an email sent through with the hyperlink visible (and clickable - yay!) What I want to do however is to provide Display Text for the hyperlink so that whilst the underlying URL is eg http://www.google.com?id=323498 the text visible to the recipient is Your Link or something appropriate. So it is the same concept as in Outlook when you Insert Hyperlink, you provide the Address but you can also provide Text to Display. (Same in GMail etc). Any ideas how to achieve this? Thanks!!

      C Offline
      C Offline
      Covean
      wrote on last edited by
      #2

      I don't know how to achieve this in javascript but your email body has to be a html body and not a plain text body as your sample code looks like. After you set this email property you can use html instead of plain text in your email body.

      Greetings Covean

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups