Right.  I've had a bit of think about this.

The problem appears to be occurring because I am attempting to use James
as an email router that filters non local recipients.  

My config.xml is set to deliver all local recipients (ie the RCPT-TO
recipients) via LocalDelivery, and my Mailet, which comes after this is
filtering everything else (ie the To, CC, and BCC which are not local)

In this case the RCPT-TO I am guessing (I have not checked yet) will be
empty.  There are still recipients, but they are in the MimeMessage.

The only way I can see around this, given the MimeMessageWrapper issue
is to use MimeMessageWrapper.addHeader and
MimeMessageWrapper.removeHeader to set the recipient list, which does
appear to write through to the underlying MimeMessage.

I am still worried however that the MimeMessageWrapper.getSize() and
MimeMessageWrapper.getMessageSize() functions return the size of the
original, rather than the amended MimeMessage.  I am not sure whether
this is a problem yet...

Any thoughts on this matter appreciated.

N



-----Original Message-----
From: Neill Robbins 
Sent: 26 November 2003 12:29
To: [EMAIL PROTECTED]; James Users List
Subject: RE: LOTS of MimeMessageWrapper issues... bugs?
Importance: Low


Right.  I've done some more investigation, and I still have a problem.

Mail.getRecipients() does not return you all the recipients.  It only
returns you the RCPT-TO recipients.

So If you have (as I do) an incoming MimeMessage with to, cc and bcc I
cannot get access to the cc or bcc recipients via the james Mail object,
other than via the MimeMessage using Mail.getMessage().

However, even if I do this.  I cannot update the MimeMessage cc or bcc
recipients due to problems in MimeMessageWrapper as per my previous
email.

Suggestions? :-(

N

-----Original Message-----
From: Serge Knystautas [mailto:[EMAIL PROTECTED] 
Sent: 25 November 2003 01:40
To: James Users List
Subject: Re: LOTS of MimeMessageWrapper issues... bugs?
Importance: Low


> Have I got this totally wrong, or is there a serious set of bugs here?

Unfortunately it's the former.

You shouldn't be touching the MimeMessage if you want to change the 
recipient list.  You want to edit the Collection of MailAddress objects 
available from the Mail object.

If you think of it this way, the MimeMessage is the actual email 
message, which you wouldn't want to be changing... you don't want to 
add/remove To: Cc: headers to the message.  The Mail object contains 
both the MimeMessage that we're delivering and the recipients of that 
message.

-- 
Serge Knystautas
President
Lokitech >> software . strategy . design >> http://www.lokitech.com p.
301.656.5501 e. [EMAIL PROTECTED]


---------------------------------------------------------------------
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]

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

Reply via email to