Re: [Jmap] Attachments and composing more complex MIME structures

Neil Jhaveri <neil@neiljhaveri.com> Tue, 08 August 2017 18:17 UTC

Return-Path: <neil@neiljhaveri.com>
X-Original-To: jmap@ietfa.amsl.com
Delivered-To: jmap@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3E90D132513 for <jmap@ietfa.amsl.com>; Tue, 8 Aug 2017 11:17:46 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=neiljhaveri-com.20150623.gappssmtp.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dirUOY5r4vuZ for <jmap@ietfa.amsl.com>; Tue, 8 Aug 2017 11:17:45 -0700 (PDT)
Received: from mail-pf0-x22c.google.com (mail-pf0-x22c.google.com [IPv6:2607:f8b0:400e:c00::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id BB2DA132A92 for <jmap@ietf.org>; Tue, 8 Aug 2017 11:17:44 -0700 (PDT)
Received: by mail-pf0-x22c.google.com with SMTP id h68so17689543pfk.0 for <jmap@ietf.org>; Tue, 08 Aug 2017 11:17:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=neiljhaveri-com.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=+ykKPY1tCqZzaCNnVr/Ho4kTsHtehZBk6BachPImXY0=; b=UXHENGy+LrXADcRvqqMx8JJ9OKhrbrqFl2DLa/FrloCN9ZkzsGUkrgqmNvCRsk8yWu xU1pxsafLCsM7pwbX9gkt2zdxJ0SVe765gw/vj1XiwAD1PDVk8js9N+L9kG3No0S6Zlb uIiP7sSymGWJNaovAveCXStc7bqu9B3zXVrCZmpg92IpQ4wwp1R81g76jHBJcPhrszbx VfV2hj66srzjnotQlU69vvxcz16ghuldr8Y2YTDLhJi6ItcyH1js4XmeF8oPA3rlbBz0 JSCFawIbQ4GyMCM8BG+0HrliNXuRCVvz6bu1YHWi0a4I5zx3Dl+pOA7rc6X7ljzG8ulz H4SA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=+ykKPY1tCqZzaCNnVr/Ho4kTsHtehZBk6BachPImXY0=; b=FDGBxWGMHxal+kUtvsuhbUneBZwoJQsT806GzS/xzjxwGo5QdodSuxbk2btlVvVn+s NOxEXmNcHBXSgc52Nti0uvBdH9guow/IfORi4bjOEeDrRbgwNYtd+vCtfvI0usDg4t3l vLwjGrdH1cW+7DT94szwhdTJ5tPBzA3SfApYAorq/k6HrTv/PezpGH3+lf6rGIJ5NgcH pqK8SNQlzjjfn+CRiVfxwwdOofDXLKfSyQWS9ibIqQk0Ww27InqTHdwnV96H06GNJQXY z1DLGuJbtzR48eQvDnWarilNtfZ8Mt9PcnMrqmxLb/nJCVw57GaLzPGXOilsZIafCbMO FcLA==
X-Gm-Message-State: AHYfb5jabSWzw8L50hI56ApM+Pz+G4rzBfD8QHs9y6+I9Rh254ewD07d llnTzVMDwuuqLu2DY8hkyA==
X-Received: by 10.99.51.142 with SMTP id z136mr4907018pgz.275.1502216264349; Tue, 08 Aug 2017 11:17:44 -0700 (PDT)
Received: from [192.168.1.3] (ip70-190-168-77.ph.ph.cox.net. [70.190.168.77]) by smtp.gmail.com with ESMTPSA id c7sm3865729pfg.29.2017.08.08.11.17.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Aug 2017 11:17:43 -0700 (PDT)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
From: Neil Jhaveri <neil@neiljhaveri.com>
In-Reply-To: <1502188117.322839.1066636392.362BFD31@webmail.messagingengine.com>
Date: Tue, 08 Aug 2017 11:17:41 -0700
Cc: jmap@ietf.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <BF5DBECF-F4EC-4137-9B45-F6A777755459@neiljhaveri.com>
References: <20170808092341.GB1457@meili> <1502188117.322839.1066636392.362BFD31@webmail.messagingengine.com>
To: Neil Jenkins <neilj@fastmailteam.com>
X-Mailer: Apple Mail (2.3273)
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/tvVmJ1Y79XXRXOCf5jCLc-tQfEc>
Subject: Re: [Jmap] Attachments and composing more complex MIME structures
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: JSON Message Access Protocol <jmap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jmap>, <mailto:jmap-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jmap/>
List-Post: <mailto:jmap@ietf.org>
List-Help: <mailto:jmap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jmap>, <mailto:jmap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 08 Aug 2017 18:17:46 -0000

Yeah, the Apple Mail clients have a preference to avoid sending text/html, unless strictly necessary by the content:
(A) A philosophical preference that text/plain be used whenever possible, since it results in a neater and more overall compact message, without the redundancy of including both a text/html part with a text/plain fallback alternative part.
(B) Broken implementations in the wild that caused various small support issues. The Apple clients did change once to always sending text/html if there are images, but reverted it in a software update. For instance, some Japanese cell phone carriers couldn’t properly handle messages sent to an MMS bridge e-mail address if an image wasn’t a top-level MIME part.

How do other people here feel about the preference for text/plain?


On Aug 8, 2017, at 3:28 AM, Neil Jenkins <neilj@fastmailteam.com> wrote:

> Although not clear yet (this bit of the spec needs a lot more details), the intention is that a JMAP server would convert this to an htmlBody in the Message object that combined the text and images (with cids).

I agree, I’d like to see if the API can remain as-is, and we detail in the spec how servers should construct MIME. I’d be happy to help with this part.

> No, but you could produce an HTML part that's going to render the same
> (and be more compatible).

Can you clarify this?



There is also the uglier case of "inlined attachments" that cannot be properly referenced by HTML tags, e.g.:
	[plain text]
	[zip attachment]
	[more plain text]

I think the Apple clients are the only ones that even support this in the UI and make a multipart/mixed message out of it, but I’m not sure. Does anybody know if any other major clients offer this kind of UX?  I’ve personally never been a fan of it at all, and I think the resultant message looks confusing in some other MUAs, but it does have some occasional use. My hunch is that it only affects the Apple clients, so it doesn’t seem worth complicating matters here.

Neil