[
https://issues.apache.org/jira/browse/EMAIL-50?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12480132
]
Morten Hattesen commented on EMAIL-50:
--------------------------------------
I don't think the current multi-part structure is strictly according to the
MIME recommendations.
The currently proposed layout of a multi-part message containing a text/plain
part, as well as a text/html part with embedded images is...
Entity Content-Type Encoding
1 multipart/alternative
1.1 text/plain 7bit
1.2 text/html 7bit
2 image/jpeg base64
3 image/jpeg base64
... but since the embedded images are part of the text/html part, and thus
should not be available to a text/plain reader, I believe the proper layout of
such a message should be:
Entity Content-Type Encoding
1 multipart/alternative
1.1 text/plain 7bit
1.2 multipart/related
1.2.1 text/html 7bit
1.2.2 image/jpeg base64
1.2.3 image/jpeg base64
... with possible attachments appearing as (2, 3, ...).
Furthermore, I believe that if a HtmlEmail is composed with only a text/plain
component, it should result in a message identical to a MultiPartEmail message,
rather than synthetically generating a text/html message with the plaintext
contained in a <pre>...</pre> block, which bloats the smtp message to twice the
size, for no reason.
Should this be raised as two separate (new) JIRA reports against EMAIL version
1.1?
> [email] HTML Emails with images don't display in Outlook 2000
> -------------------------------------------------------------
>
> Key: EMAIL-50
> URL: https://issues.apache.org/jira/browse/EMAIL-50
> Project: Commons Email
> Issue Type: Improvement
> Affects Versions: 1.0
> Environment: Operating System: other
> Platform: Other
> Reporter: Andrew Liles
> Priority: Minor
> Fix For: 1.1
>
> Attachments: html-embed-images.patch, HtmlEmail.java.patch,
> HtmlEmail2.java
>
>
> I was having a problem sending HTML Emails with inline image attachments
> against
> the client Microsoft Outlook 2000 SP-3. I am using commons-email-1.0.jar.
> This bug report proposes a solution include code.
> Suppose with an HtmlEmail I am embedding 2 images, adding an HTML part and
> Text
> part.
> The resultant Body structure is:
> Entity Content-Type Encoding
> 1 text/plain 7bit
> 2 multipart/related
> 2.1 text/html 7bit
> 2.2 image/jpeg base64
> 2.3 image/jpeg base64
> Outlook, by default, shows the text part with the HTML email as an attachment
> (correctly showing the images). My "problem" is that I think the HTML should
> be
> shown by default.
> I am guessing that it is an issue with this particular email client and the
> Body
> Structure format ? (see here, for example: COM-1526)
> ---
> I have fixed this for my own purposes and am recording the details here for
> the
> benefit of others. I don't know whether this should be categorised as a bug
> in
> commons-email-1.0.jar or a bug in Outlook. I suspect the latter, but since
> back
> versions of Outlook will never get fixed, the pragmatic solution is to alter
> commons-email, particularly in cases if you are targeting a known finite set
> of
> email clients.
> I am fully expecting a committer to categorize this as WONTFIX, but at least
> the
> attachment I will add may allow others to use my code.
> My code has been tested to work on:
> Microsoft Outlook Express 6.00
> Microsoft Outlook 2000 SP-3
> Microsoft Outlook 2002
> Microsoft Outlook 2003
> Qualcomm Eudora 6.0.3.0
> SquirrelMail 1.5.1 (webmail client)
> Hotmail (as of November 2005)
> Gmail (as of November 2005)
> These clients are all happy to receive and display HTML emails in the expected
> way using this Body Structure:
> Entity Content-Type Encoding
> 1 multipart/alternative
> 1.1 text/plain 7bit
> 1.2 text/html 7bit
> 2 image/jpeg base64
> 3 image/jpeg base64
> I have not tested with attachments that do not relate to the HTML and may not
> support this scenario; however this is not normal usage scenario (well, for me
> anyway).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]