I developed a paging application to send emails and text messages to our users. We want to be able to create a hyperlink within the message that points to a specific email message on our company SMTP server.
I can send a text message that creates a link to Outlook doing this: https://mail.domain.com. We want to create a link to a specific email message.
I found instructions to do this in a couple of ways. They are:
Link: Outlook:Inbox/~Subject (surrounded by <>) or Link: Outlook:'GUID' (surrounded by <>)
But they are giving me the error message: ASP.NET has detected data in the request that is potentially dangerous because it might include HTML markup or script.
Can anyone direct me on how to create a link to a specific email message on our SMTP Outlook server?
Thanks.
UPDATE I can send the text message but the link is not displayed as a link but text. This is my email body string that can be texted to my cell phone but the link does not go to the email defined. I tried just creating the Outlook link like this:
string test = "<Outlook:Inbox//~New Provider>";
EmailInfo.Message = HttpUtility.HtmlEncode(test);
I also tried creating a link using href:
string test = "<a href=\"<Outlook:Inbox//~New Provider>\">Email Link</a>";
EmailInfo.Message = HttpUtility.HtmlEncode(test);
Both successfully sent a text message to my phone. But I could not click on the links. They were displayed as text like this: MSG:<a href="<Outlook:Inbox//~New Provider>">Email Link</a>
Why is the link displayed as plain text?