Diego Castillo wrote:
>
> One of my mailets sends outgoing messages to the top of the root
> processor. It needs to attach some information for the other mailets
> that will process the new message. I have been doing this via a
> MimeMessage header, but would like to use a Mail attribute instead.
>
> However, none of the MailetContext.sendMail() permits setting the
> attributes of the outgoing message. I could use the
> sendMail(Mail) if I
> could create a new MailImpl object, but this object is not visible
> through the Mailet API.
>
> What I am looking for is a MailetContext.sendMail(MailAddress sender,
> Collection recipients, Collection attributes, MimeMessage msg) method.
> Is there a way to circumvent this problem?

The mail object you receive in your mailet implements the interface
org.apache.mailets.Mail. This supports a variety of MailAttribute
operations. MailImpl also implements org.apache.mailets.Mail. You certainly
can create new instances of MailImpl within a mailet - see AbstractRedirect
for example.

So, you can set MailAttributes on mail coming into your mailet and any new
Mail you create. No modifictions to the MailetContext are required.

-- Steve


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to