commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott <>
Subject Re: [mail] html email with attachments
Date Tue, 31 Aug 2004 13:25:53 GMT

Unfortunately I don't have the ability to commit to commons-email cvs, however I will send
patch to commons-dev in hopes of getting feedback from someone there.


Leandro Rodrigo Saad Cruz wrote:
> Hi Scott. Could you send this patch against CVS HEAD ?
> On Thu, 2004-08-19 at 02:07, Scott Dietrich wrote:
>>I've been using commons-email (and turbine) for some time to send plain 
>>text emails (SimpleEmail) and plain text with an attachment 
>>(MultiPartEmail), and its really quite nice, easy to use, etc. However, 
>>recently I've been looking into using commons-email for sending html 
>>email (and plain text alternative) with an attachment, and things seem 
>>somewhat broken.
>>What I'd like is a "multipart/mixed" email with 2 parts: part 1 is a 
>>nested "multipart/alternative" with plain text followed by text/html, 
>>and part 2 is the attachment.
>>The current HtmlEmail class documentation implies that an html email 
>>with a text alternative will work, but unfortunately it doesn't in many 
>>email programs (e.g. Apple Mail) because it sets creates a message with 
>>2 or more parts (html, then text, followed by any attachments) with a 
>>MIME subtype of "related". I guess the subtype of "related" is used for 
>>embedded image support, but it really kills the ability to have an html 
>>email with a text alternative. The MultiPartEmail and HtmlEmail classes 
>>really need to be modified to deal with nested parts so that things work 
>>properly across different mail user agents.
>>Below is a patch to MultiPartEmail that should keep things working the 
>>same way for current users of MultipartEmail and HtmlEmail, but adds 
>>some flexibility for people who need more control over how the message 
>>is constructed (set the subtype of the primary body part, and add nested 
>>multiparts). If there's anything I can do to improve the chances of 
>>getting this patch committed, just let me know :).

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message