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: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]