Issue Details (XML | Word | Printable)

Key: EMAIL-35
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Ben Speakmon
Reporter: Brandon Wolfe
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Commons Email

[email] Embedding raw DataSource Attachments

Created: 28/Sep/05 11:07 PM   Updated: 09/Jun/07 11:48 PM
Return to search
Component/s: None
Affects Version/s: 1.0
Fix Version/s: 1.1

Time Tracking:
Not Specified

File Attachments:
  Size
Java Source File EnhancedHtmlEmail.java 2005-09-28 11:09 PM Brandon Wolfe 3 kB
Text File Licensed for inclusion in ASF works HtmlEmail.patch 2007-01-03 12:19 AM Ben Speakmon 6 kB
Text File Licensed for inclusion in ASF works HtmlEmailTest.patch 2007-01-03 12:19 AM Ben Speakmon 1 kB
Environment:
Operating System: All
Platform: All
Issue Links:
Duplicate
 

Bugzilla Id: 36844
Resolution Date: 09/Jun/07 11:48 PM


 Description  « Hide
I kick myself for not submitting this prior to 1.0. An important feature
missing from org.apache.commons.mail.HtmlEmail is the ability to embed an
arbitrary DataSource object. The current API only allows you to embed from a
URL. My usage of CommonsEmail often includes the generation of image data
on-the-fly, where it does not exist at a pre-defined URL.

I propose the addition of a key method:

public String embed(DataSource datasource, String name, String cid) throws
EmailException

This will allow us to attach our own datasources in addition to defining our own
content-ids. Helper methods can be created to auto-generate CIDs when needed
and allow for backwards compatability. I've found that being able to provide my
own defined CIDs has been very helpful in referencing them in my velocity email
templates.

I will attach the current EnhancedHtmlEmail class that I have been using for a
year or so. It extends HtmlEmail to provide the methods explained above. I
would hope to have this capability introduced into the HtmlEmail class.

Feel free to contact me to discuss further! Thanks.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
No work has yet been logged on this issue.