Long URLs in mailto: links – “Solved”

Hey Ho!

I struggled with this problem for quite some time before coming to a “solution’. If my google trawl is anything to go by, so have a fair number of others.

Actually there isn’t a problem, as such, just a limitation of what you can do in certain browsers (you know who you are IE).

If you have a mailto link that is longer than 512 characters you will run into problems. The exciting bit (lol) is that they won’t be apparent if you test in FireFox, Safari, Chrome or Opera. But if you click on the link in IE (I’ve only tested 8 and 9 but I assume it’s the same with other versions) then you will see the problem – or rather you won’t as nothing much happens. The email client is not called, no email is created and you are sent to a blank page or alternatively absolutely nothing happens.

There may be the following error message: “The data area passed to a system call is too small.” This can be seen by double-clicking on the task bar.

The solution, of sorts, is either to shorten the mailto link (difficult in my case as it is dynamically generated) or try something else.

It seems that if you turn on Protected Mode in IE this can (partially) help. Turning on Protected Mode is done via the Tools menu – choose Internet Options and click on the Security tab. Bizzarely, this seems to turned off by default in some installations. This seems to fix the problem as this raises the limit to around 2K  2083 (see my new post here) which should be enough, but …

If this doesn’t solve the problem you may have exceeded the larger 2K character limit in IE.

More anon …