Return-Path: Delivered-To: apmail-commons-issues-archive@locus.apache.org Received: (qmail 80765 invoked from network); 14 Mar 2008 22:14:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Mar 2008 22:14:05 -0000 Received: (qmail 4537 invoked by uid 500); 14 Mar 2008 22:14:01 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 4452 invoked by uid 500); 14 Mar 2008 22:14:01 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 4443 invoked by uid 99); 14 Mar 2008 22:14:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Mar 2008 15:14:01 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Mar 2008 22:13:21 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id AC96B234C09B for ; Fri, 14 Mar 2008 15:12:24 -0700 (PDT) Message-ID: <333705577.1205532744705.JavaMail.jira@brutus> Date: Fri, 14 Mar 2008 15:12:24 -0700 (PDT) From: "Jim McCabe (JIRA)" To: issues@commons.apache.org Subject: [jira] Updated: (EMAIL-74) Create an overridable method in Email.java to create the MimeMessage instance In-Reply-To: <1211496704.1205531784321.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/EMAIL-74?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jim McCabe updated EMAIL-74: ---------------------------- Description: 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. was: 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() 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. Added session parameter to createMimeMessage() API suggestion. > Create an overridable method in Email.java to create the MimeMessage instance > ----------------------------------------------------------------------------- > > Key: EMAIL-74 > URL: https://issues.apache.org/jira/browse/EMAIL-74 > Project: Commons Email > Issue Type: Improvement > Affects Versions: 1.1 > Environment: All Java > Reporter: Jim McCabe > Priority: Minor > Original Estimate: 1h > Remaining Estimate: 1h > > 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. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.