Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DC6B09C73 for ; Tue, 28 Feb 2012 19:00:39 +0000 (UTC) Received: (qmail 10487 invoked by uid 500); 28 Feb 2012 19:00:38 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 10404 invoked by uid 500); 28 Feb 2012 19:00:38 -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 10267 invoked by uid 99); 28 Feb 2012 19:00:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Feb 2012 19:00:38 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Feb 2012 19:00:37 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 2627533F221 for ; Tue, 28 Feb 2012 18:59:47 +0000 (UTC) Date: Tue, 28 Feb 2012 18:59:47 +0000 (UTC) From: "Brian Telintelo (Commented) (JIRA)" To: issues@commons.apache.org Message-ID: <4888522.29553.1330455587157.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1425324864.28305.1330442266416.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (EMAIL-115) Need a way to remove emails from an already created, but not sent message. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/EMAIL-115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13218475#comment-13218475 ] Brian Telintelo commented on EMAIL-115: --------------------------------------- Thanks, that is a good work around. > Need a way to remove emails from an already created, but not sent message. > -------------------------------------------------------------------------- > > Key: EMAIL-115 > URL: https://issues.apache.org/jira/browse/EMAIL-115 > Project: Commons Email > Issue Type: Improvement > Affects Versions: 1.2 > Reporter: Brian Telintelo > Priority: Blocker > Fix For: 2.0 > > > Ok, so we have one send email method which takes org.apache.commons.mail.Email param. It then checks to see if email sending is enabled(configured by server instance), then sends the mail if it is. Problem happens for our QA testing. We need to test email content, but don't want to send emails to actual users in QA environment. What we want to do is modify our "one" send email method and clear out the To,CC,BCC fields and then set the TO field to be our testing list. But, there is no way to remove emails already added. Setting it to null or empty collection results in an EmailException. And we can't create a new email instance and copy because there is no get message accessor available. We need a way to remove emails....somehow. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira