mailto - limitations and paths forward

The mailto tag used in html content is used to load the default mapi client (email client) on the user's box when its link is clicked and have it display a window for sending email. The mailto link can contain basic information such as who the message, subject, etc. There are however some limitations.

Things to think about:

· The mailto link can only hold so much information (a few K depending upon the version of Internet Explorer (IE)). This may be too limiting for many uses.

· Best case, the link can hold Unicode data if the data is UTF8 encoded for IE7, however you may need to turn that on in IE if it’s unchecked. Look at “Send UTF-8 URLs” under the Advanced Tab. With earlier IE versions and other browsers, getting Unicode data is more challenging.

· You cannot attach a file using mailto.

Here is a wonderful write-up from our IE team:

      International Mailto URIs in IE7

      https://blogs.msdn.com/ie/archive/2007/02/12/International-Mailto-URIs-in-IE7.aspx

There are some options to work around the limitations of mailto such as:

· Making the code server side (asp/asp.net)

· Creating a signed add-in which will launch the mail client (ouch!)

     

· Run script to automate something like Outlook from HTML (you’ll need to lower security settings to the point the client will be very susceptible to viruses – that would be a very bad idea, eh?).

· Opt for client-side code to run – yes that means changing your app from being web based.

This is not going to be an easy one to choose a path forward for many people. Overall, the best solution is usually to live with what mailto can do or to have the code run server side and use an API such as System.Net.Mail, CDOSYS or System.Web.Mail to send the messages.