links in email body message
-
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
-
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
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?".' -
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?".'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