I have an C# app, which gets the mail informations like To, subject, message. Then it calls the wcf service to send a mail(intern it uses smtpclient.send()). The issue is, when the message body contains hyperlink, it is not regonized as a link. It sends as a plain text.
This has 2 scenario’s,
- http://localhost/my%20pages/test.aspx – not recognized as a link
- http://localhost/mypages/test.aspx – recognized as a link
But both the mail property is plain text. I am using the HttpUtility.UrlEncode(), to encode the link.
how to solve this issue?
Thanx in advance
Send the email as HTML if you want to ensure URLs are links – you will need to format it as HTML.
Plain text will not magically create links for you, though some email clients will see a
httpprefix and automatically create a link from it, whether the source was text or not (Outlook for example).