Skip to content Skip to sidebar Skip to footer

Mailto Not Working With Large Body Content

I am trying to use mailto function for getting the outlook window in my web application, using the below code. Send mail&

Solution 1:

First I would refer to this as to why the URL length limit exists. I have tried a quick test using latest Firefox and Outlook 2010 using this

<html>
<body>
<form action="mailto:me@me.com">
<textarea name="body"></textarea>
<br/>
<input type="submit" />
</form>
</body>
</html>

In my case the limit was 2061 characters, but that would be traded off against the email length. Even using POST method the result is the same for me.

The linked question (and its top answer) advise not to rely on lengths longer than 2000 as of April 2016 for the reasons listed.

getting around this

I can suggest a couple directions to explore as an alternative.

  1. Using scripting to invoke Outlook. I don't like it (compatibility, safety) but this may be the one time ActiveX might be a solution.
  2. If the aim is to preview an email, edit, and send, you may consider writing the application to send a draft copy of the email from the server end.

Personally I would explore #2 over #1. In that solution the user would receive an email containing the draft message, which they can edit and forward, or copy into a new email. It's not ideal but it might do for your requirements.


Post a Comment for "Mailto Not Working With Large Body Content"