Reputation: 9102
I use the following mailto:... to export text to mail, but since sometimes the text is too long, I get the "The requested URL /... is too large to process." 414 Error. See: What is the maximum length of a URL in different browsers? .
var URI='mailto:?subject=' + encodeURI(subject) + '&body=' + encodeURIComponent(body);
window.open(URI,'_blank');
How can it be done in a way that would allow to export an email longer than the URL limit length?
Thanks
Upvotes: 1
Views: 466
Reputation: 98786
There isn't any other way to provide a purely in-browser interface for creating an e-mail, so you're pretty much stuck with the browser's URL length limits.
You could write some server-side code that lets you upload the text in question via an HTTP post request, and then sends the e-mail from the server. But, unlike mailto
, that doesn't use the end-user's own e-mail program/address.
Upvotes: 1