Issue Details (XML | Word | Printable)

Key: EMAIL-74
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Siegfried Goeschl
Reporter: Jim McCabe
Votes: 0
Watchers: 0
Operations

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

Create an overridable method in Email.java to create the MimeMessage instance

Created: 14/Mar/08 09:55 PM   Updated: 24/Feb/09 10:32 PM
Return to search
Component/s: None
Affects Version/s: 1.1
Fix Version/s: 1.2

Time Tracking:
Original Estimate: 1h
Original Estimate - 1h
Remaining Estimate: 1h
Remaining Estimate - 1h
Time Spent: Not Specified
Remaining Estimate - 1h

File Attachments:
  Size
Text File Licensed for inclusion in ASF works EMAIL-74-patch.txt 2008-11-24 09:47 AM Corey Scott 0.8 kB
Environment: All Java

Resolution Date: 24/Feb/09 10:32 PM


 Description  « Hide
I would like more control over the MimeMessage instance that is created by Email.java in buildMimeMessage().

Currently it simply instantiates one directly - new MimeMessage(). It would be nice if it called a protected method called something like createMimeMessage(session) so that I could override that with my own subclass.

Why would I want to subclass it? So I can set the Message-Id on the outgoing message. See this link:

http://java.sun.com/products/javamail/FAQ.html#msgid

I've got my own subclass ready but I have no way to hook into Email.java to use it.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #747585 Tue Feb 24 22:31:24 UTC 2009 sgoeschl [EMAIL-74] Create an overridable method in Email.java to create the MimeMessage instance.
Files Changed
MODIFY /commons/proper/email/trunk/xdocs/changes.xml
MODIFY /commons/proper/email/trunk/src/java/org/apache/commons/mail/Email.java