Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!news.osn.de!diablo2.news.osn.de!217.188.199.168.MISMATCH!takemy.news.telefonica.de!telefonica.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <79399539.ZlHCqS61bk@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Sun, 07 Oct 2012 18:55:51 +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> Followup-To: comp.lang.javascript MIME-Version: 1.0 Lines: 69 NNTP-Posting-Date: 07 Oct 2012 18:55:53 CEST NNTP-Posting-Host: 729b98c0.newsspool2.arcor-online.net X-Trace: DXC=bR;fB<697_FWDmlTRbh@=IA9EHlD;3YcB4Fo<]lROoRA8kFK@?H3jTVH[5eDi8jC0mN:QOL X-Complaints-To: usenet-abuse@arcor.de Xref: csiph.com comp.lang.javascript:16449 Stefan Weiss wrote: > On 2012-10-06 21:29, Patricia Shanahan wrote: >> I could install scripts in my personal domain, but I don't think users >> would want their data to go through my domain. > > They're already trusting your app to handle their data properly, so why > would they worry about the forwarding server? In the usual case, the > script doing the web-to-mail forwarding will be a very simple affair. > You can make it available as an open source download for those who do > have a server, and provide forwarding on own server as a (free?) service. She has explained that her users and the organizations they belong to are usually neither willing nor capable of running a server-side script. > 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. It's not that the language is too limited, > the problem is that browsers don't usually expose that kind of > functionality to scripts (and for good reason). 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"; And as for mobile devices which are the primary concern here, I have found that to work in various browsers and with various e-mail apps both on iOS 4.2.1 and Android 4.0.3 both with `http:' and (on Android, the equivalent of) `file:'. I would be surprised if it did not work elsewhere, such as newer OS versions and on Windows Mobile. (There are other mobile OSes, but the application requirements can reasonably state that they are not actively supported, given the current and projected combined market share of the aforementioned ones). The actual limitation here is twofold: URI length and e-mail client. If the data can be encoded so that it fits within about 447 octets in the worst case – scheme (7) + address (20) + subject (9 + 20) + body (6 + 447) = MSHTML maximum (509) – for a stream of ASCII characters without control characters except perhaps CR and LF, and if there is an e-mail client installed and configured on the same system, then this can be done using a plain-text e-mail. For the desktop system where the e-mail is being retrieved to later can provide the data decoding service. Testcase: > Even Java applets can't send emails to random SMTP servers. In theory, > they'd be powerful enough (for example with JavaMail, or by just opening > a socket and speaking SMTP directly), but the default security > restrictions will prevent them from connecting to anything but the > originating host. You do not have to send the e-mail from the browser. > From what I understand about your project, you have two options: the > HTML+JS approach you described plus a server-side component, or you bite > the bullet and build native apps for each target platform. You could > still do most of the layout/navigation parts in HTML+JS, but your app > will have to handle the email part. Neither one may be necessary. PointedEars -- Danny Goodman's books are out of date and teach practices that are positively harmful for cross-browser scripting. -- Richard Cornford, cljs, (2004)