Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!news2.arglkargh.de!noris.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <2099912.ChtckanCIY@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Sun, 07 Oct 2012 22:12:48 +0200 User-Agent: KNode/4.4.11 Content-Transfer-Encoding: 8Bit X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. <2610175.x4FWaXcEle@PointedEars.de> <7238984.617k9mAqVa@PointedEars.de> <79399539.ZlHCqS61bk@PointedEars.de> Followup-To: comp.lang.javascript MIME-Version: 1.0 Lines: 59 NNTP-Posting-Date: 07 Oct 2012 22:12:49 CEST NNTP-Posting-Host: 8bcb1707.newsspool2.arcor-online.net X-Trace: DXC=I^W_4Rm@=JFA@P]\DA9EHlD;3YcB4Fo<]lROoRA8kFK@XB;PldmT3:CAT3^CjVLObB X-Complaints-To: usenet-abuse@arcor.de Xref: csiph.com comp.lang.javascript:16454 Stefan Weiss wrote: > On 2012-10-07 18:55, Thomas 'PointedEars' Lahn wrote: >> Stefan Weiss wrote: >>> I think sending attachments by email with JS alone (from an HTML >>> document in a browser) is a lost cause, especially if it has to work on >>> as many clients as possible. [...] >> >> Is that so? I have not found a single Web browser that, if an e-mail >> client is installed and configured on the same system, does not support >> code of the form >> >> window.location = "mailto:foo@bar?subject=baz&body=bla"; > > I said "sending *attachments* by email" (and so does the subject). ACK. But if you read the whole thread you will observe that this is only one part of the problem/question. Insofar the Subject was not well-chosen either. > I have not found a single web browser that could do that (haven't > actually searched for one, either, to be honest). Setting the Content-Type header field of the generated message to `multipart/mixed; boundary="…"' as required per RFC 2046 does not work in "Chromium 21.0.1180.89 Built on Debian wheezy/sid, running on Debian 6.0.6 (154005)" with Icedove 10.0.7. As a result, there is no attachment. Because other header fields can be set in this environment, this suggests that setting the Content-Type header field does not work in WebCore-based browsers at all, which covers most mobile browsers today. > Even in the simple case with no attachments, all the browser does is > invoke a handler application which has been registered for "mailto:" > links. […] I am aware of that. I am also aware that many, if it not all, modern mobile operating systems provide a built-in e-mail client that is designed to work with the equally built-in Web browser. > In theory, mobile apps could provide these host objects to their > scripts, but why bother It would be interesting to find out and very useful. > just send the mail from the native part of the app. That is assuming that there is an app in the first place. One reason for using a local Web application (via file:// and equivalents) is not having to install another application and adding the requirements, and granting it the permissions, that come along with that. PointedEars -- var bugRiddenCrashPronePieceOfJunk = ( navigator.userAgent.indexOf('MSIE 5') != -1 && navigator.userAgent.indexOf('Mac') != -1 ) // Plone, register_function.js:16