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. ASP.NET
  4. links in email body message

links in email body message

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netcomtestingbeta-testing
3 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.
  • V Offline
    V Offline
    viktor9990
    wrote on last edited by
    #1

    I wonder how is it possible to make some text in my Mail.Body as a link in ASP.NET C#? In this case I want (http://www.mycompany.com) to be clickable in all my messages. Thanks //Create MailMessage object MailMessage Mail = new MailMessage(); Mail.To = ToTbox.Text.Trim(); Mail.Subject = "Testing"; Mail.Body = "standard message that will be included in all my messages visit our site http://www.mycompany.com" Mail.From = "vikral@test.se"; SmtpMail.Send(Mail); Viktor

    T 1 Reply Last reply
    0
    • V viktor9990

      I wonder how is it possible to make some text in my Mail.Body as a link in ASP.NET C#? In this case I want (http://www.mycompany.com) to be clickable in all my messages. Thanks //Create MailMessage object MailMessage Mail = new MailMessage(); Mail.To = ToTbox.Text.Trim(); Mail.Subject = "Testing"; Mail.Body = "standard message that will be included in all my messages visit our site http://www.mycompany.com" Mail.From = "vikral@test.se"; SmtpMail.Send(Mail); Viktor

      T Offline
      T Offline
      tojamismis
      wrote on last edited by
      #2

      This is not an entirely straightforward issue. Some clients such as outlook or msn explorer automatically link any detected hyperlinks. But if the user is using any webmail client or aol, then you need to add the hyperlink into your email. I think that on a majority of current email clients if you place the hyperlink into your Body string it will work as expected. But... there are other items you won't be able to get around. Some users still use Text Only mail as a security precaution. Some companies might strip HTML out of messages before it reaches a user's inbox, etc. Your best bet is probably to go with with placing the hyperlink <a href="http://www.mycompany.com">http://www.mycompany.com</a> into your email string and then maybe put just your companies URL in the footer of the message in case the user is a text only client. Torin Blair
      'In the immortal words of Socrates - "I drank what?".'

      V 1 Reply Last reply
      0
      • T tojamismis

        This is not an entirely straightforward issue. Some clients such as outlook or msn explorer automatically link any detected hyperlinks. But if the user is using any webmail client or aol, then you need to add the hyperlink into your email. I think that on a majority of current email clients if you place the hyperlink into your Body string it will work as expected. But... there are other items you won't be able to get around. Some users still use Text Only mail as a security precaution. Some companies might strip HTML out of messages before it reaches a user's inbox, etc. Your best bet is probably to go with with placing the hyperlink <a href="http://www.mycompany.com">http://www.mycompany.com</a> into your email string and then maybe put just your companies URL in the footer of the message in case the user is a text only client. Torin Blair
        'In the immortal words of Socrates - "I drank what?".'

        V Offline
        V Offline
        viktor9990
        wrote on last edited by
        #3

        qs["senderAdmin"] = Context.User.Identity.Name; //The generated encrypted url that will be sent to the Customer url = "http://www.lkc.se/laikaTeleMeeting2/SigninCustomer.aspx?x=" + qs.ToString(); I have tried but it is not working: Mail.Body = "Klick here" + Min presentation; can you help me? Thanks

        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