From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Maus Subject: Re: using orgmode to send html mail? Date: Wed, 31 Mar 2010 22:37:19 +0200 Message-ID: <87y6h8tegw.wl%dmaus@ictsoc.de> References: <878w9krtyn.wl%dmaus@ictsoc.de> <871vfa24qo.fsf@gmail.com> <87pr2uww2d.fsf@columbia.edu> <87tys5zrwm.fsf@gmail.com> <87sk7pzk02.fsf@stats.ox.ac.uk> <87tys5r3q6.fsf@gmail.com> <87ocid7cuj.wl%dmaus@ictsoc.de> <874ok5qxp9.fsf@gmail.com> <87vdckksnj.wl%dmaus@ictsoc.de> <874ok33zje.fsf@gmail.com> <87zl1vf4ru.wl%dmaus@ictsoc.de> <874ok311t9.fsf@gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/mixed; boundary="===============1410124565==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nx4fJ-0002vH-5Y for emacs-orgmode@gnu.org; Wed, 31 Mar 2010 16:37:29 -0400 Received: from [140.186.70.92] (port=36957 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nx4fH-0002sr-Bg for emacs-orgmode@gnu.org; Wed, 31 Mar 2010 16:37:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nx4fF-0002UL-PZ for emacs-orgmode@gnu.org; Wed, 31 Mar 2010 16:37:27 -0400 Received: from mysql1.xlhost.de ([213.202.242.106]:49543) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nx4fF-0002Tx-Gz for emacs-orgmode@gnu.org; Wed, 31 Mar 2010 16:37:25 -0400 In-Reply-To: <874ok311t9.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Schulte Cc: Dan Davison , emacs-orgmode@gnu.org --===============1410124565== Content-Type: multipart/signed; boundary="pgp-sign-Multipart_Wed_Mar_31_22:37:19_2010-1"; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit --pgp-sign-Multipart_Wed_Mar_31_22:37:19_2010-1 Content-Type: text/plain; charset=US-ASCII Eric Schulte wrote: >Hi David, > [...] >> >> 2nd/ >> >> The usage of multipart/alternative is not in compliance with the >> specs, too. There it reads: >> >> [...] >> >> So if you attach *only a part* of the plain text message body, you >> should not use multipart/alternative: Because >> >> 1. a part of a message is not "an 'alternative' version of the same >> information." >> >> 2. if recipients user agent prefers html messages it will display >> only the html'ized part. >> >I should have been clearer here. I *am* using the multipart/alternative >appropriately. When a chunk of org-mode text is converted to html I am >adding a single multipart/alternative block with two alternatives, both >the plain org-mode text, and the html, so that users like me who prefer >to see plain text can do so, and users of web clients like gmail can see >nice markup. Okay, should have looked closer to the code. 1/ But I still feel uncomfortable with the current solution: Even if the message created by current org-mail-htmlize is a valid MIME message (I think so) it is a rather complex MIME structure and I have no idea how other MUAs will display such a message. Moreover, this complexity is unecessary if we make the assumption: If substantial parts of your message require html markup do be displayed by a some of your recipients, than send a html representation of the entire message along with the plain text.[1] For a recipient who preferes html the result is the same: For him the substantial parts are displayed in a meaningful way. People who prefer or depend on plain text get the plain text. And we avoid uneccesary complexity. Thinking functional this might be the first function of org-mail-htmlize[1]: Create a html representation of message body if necessary or appropriate. 2/ The second function: Attach external files that are referenced in the message. This might be useful even if you don't send out html messages: All external files are stashed into a multipart/mixed container along with a Content-Id: header field. Than all references are changed accordingly to point to the attached files: - for html use src/href with the cid: prefix - for text: good question. Maybe replace occurences of the file with a customizable string saying: "see attached file foo.bar". 3/ For Wanderlust multipart/alternative is (replace "_" by "-") __<>_{ and closing __}_<> 4/ Detecting the plain text body should not just stop on end of buffer but also on the first occurence of a MIME delimiter: Maybe the user already added a attachment. And, last not least: This has the potential for going into contrib. Maybe it should be renamed to org-mime -- it's neither just about mail, nor just about htmlizing. HTH -- David [1] This assumption may also address the concerns about sending html messages: From my perspective html message are not a problem in itself. Sometimes people have to send html messages (organizational rules) and sometimes it is appropriate for content to render properly. As far as I read on the topic of html message they got their bad name because people where sending html messages implicitely assuming that all recipients /can/ read them in the same "fancy" format as they did. Such an assumtion is wrong because it does not take into account that information and it's representation are two different things and computers are create in processing and (re)formatting information. Anyway, what org-mail-htmlize really misses is a function that adds fance pictures (cats!), sounds and maybe even flash animations to the messages :D -- OpenPGP... 0x99ADB83B5A4478E6 Jabber.... dmjena@jabber.org Email..... dmaus@ictsoc.de --pgp-sign-Multipart_Wed_Mar_31_22:37:19_2010-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iF4EABEIAAYFAkuzsn8ACgkQma24O1pEeOZ58AD/fO4aNpq2QDqiiMMGTc/+EQlz 8HPFqkI/N49ZoFhrq0cBAOxP/e5v0+HyaiOmzd/Tf4yjt0jSQ1M/X7n7W9CX/Ze0 =yhRg -----END PGP SIGNATURE----- --pgp-sign-Multipart_Wed_Mar_31_22:37:19_2010-1-- --===============1410124565== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============1410124565==--