Return-Path: Delivered-To: apmail-james-server-user-archive@www.apache.org Received: (qmail 81767 invoked from network); 9 Sep 2010 05:51:59 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 9 Sep 2010 05:51:59 -0000 Received: (qmail 68318 invoked by uid 500); 9 Sep 2010 05:51:59 -0000 Delivered-To: apmail-james-server-user-archive@james.apache.org Received: (qmail 68151 invoked by uid 500); 9 Sep 2010 05:51:57 -0000 Mailing-List: contact server-user-help@james.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "James Users List" Reply-To: "James Users List" Delivered-To: mailing list server-user@james.apache.org Received: (qmail 68143 invoked by uid 99); 9 Sep 2010 05:51:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Sep 2010 05:51:56 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [213.157.0.165] (HELO smtp.medianet-world.de) (213.157.0.165) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 09 Sep 2010 05:51:48 +0000 Received: (qmail 25469 invoked by uid 1009); 9 Sep 2010 05:51:28 -0000 Received: from nm.it-mn.de (HELO [192.168.210.195]) (213.157.14.195) (smtp-auth username mn9999997-104@it-mn.de, mechanism cram-md5) by smtp.medianet-world.de (qpsmtpd/0.84) with ESMTPA; Thu, 09 Sep 2010 07:51:28 +0200 Message-ID: <4C8875DF.7030502@apache.org> Date: Thu, 09 Sep 2010 07:51:27 +0200 From: Norman User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.1.11) Gecko/20100711 Thunderbird/3.0.6 MIME-Version: 1.0 To: James Users List Subject: Re: send email twice to the same email address References: <4C88717B.2050602@apache.org> In-Reply-To: <4C88717B.2050602@apache.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi there, sorry I missread your problem.. The solution to your problem is calling MimeMessage.saveChanges(); So this should work: this.getMailetContext().sendMail(mail.getSender(), emailAddress, mail.getMessage(), MY_FORWARD_PROCESSOR); mail.getMessage().setSubject("Changed subject"); mail.getMessage().saveChanges(); this.getMailetContext().sendMail(mail.getSender(), this.jobApplyAdminAddress, mail.getMessage(), JobApplyProcessingConfigContext.FORWARD_PROCESSOR); See: http://java.sun.com/products/javamail/javadocs/javax/mail/internet/MimeMessage.html#saveChanges() Bye, Norman Am 09.09.2010 07:32, schrieb Norman: > Hi thiere, > > you need to duplicate the mail when send it a second time. Use > something like this to get a duplicate: > > MailImpl.duplicate(mail, "uniquename"); > > > The uniquename must be generated by you, you can prolly just use some > String + Random.nextLong(); > > Bye, > Norman > > Am 08.09.2010 23:52, schrieb haipeng du: >> I try to use mail context to send email: >> this.getMailetContext().sendMail(mail.getSender(), emailAddress, >> mail.getMessage(), >> MY_FORWARD_PROCESSOR); >> mail.getMessage().setSubject("Changed subject"); >> this.getMailetContext().sendMail(mail.getSender(), >> this.jobApplyAdminAddress, >> mail.getMessage(), >> JobApplyProcessingConfigContext.FORWARD_PROCESSOR); >> >> it will only send mail one time. >> What kind of stuff I missed? >> Thanks. >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org > For additional commands, e-mail: server-user-help@james.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org For additional commands, e-mail: server-user-help@james.apache.org