Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to get around chrome mailto maxlength limit

Chrome's mailto length limit is around 2000 characters. It seems to be enough but in fact it's only enough for English Language. Because the length is calculated after encodeURI.

e.g. for only one Japanese character 'て'. encodeURI('て') gets "%E3%81%A6", which is 9 characters long. So I can only type in around 2000/9 = 200+ Japanese characters in my mail content. This is really too short.

So is there a way to get around this limit? Something like installing chrome plugin is acceptable.

Any suggestion is greatly appreciated.

EDIT

I have finally decided to use a server-side solution: Create a popup page to simulate mail client, with to, cc, subject, content and also a send button. After the user clicks the send button, the form will be submitted and server will send the mail for the user

like image 686
wander Avatar asked Jul 25 '14 09:07

wander


2 Answers

I have no problem with any sized mailto-links on a Firefox (Developer Edition 39.0a2, Windows XP), however Internet Explorer 8 and Chrome do not work with mailto-links over the mentioned size of around 2000 characters. So, I doubt it is a Windows specific problem.

like image 119
Martin Avatar answered Oct 31 '22 01:10

Martin


this appears to be a microsoft windows issue. i have tried the following on and it works well with different browsers (safari, chrome 30 & 36, ...) on mac os x.

in windows the request will get truncated to around 2000 characters. this will happen regardless of which browser is being used. it seems windows has a size limit on system uri requests.

i have tried from html <a href="mailto:?body=... and javascript document.location = encodeURI('mailto:?body=' + text) with 100k characters in the message body.

i have put both examples in this FIDDLE

like image 40
dreamlab Avatar answered Oct 31 '22 00:10

dreamlab