jbi joe ha scritto:
> IM creating my own custom mailet and gettin an error
> trying to extract the mail out of the service method.
> The getMessage appears fine, but then looking at
> the result parts of the message cause exceptions.
> Here is code snippet...
> 
> public void service(Mail mail) {
> MimeMessage message = mail.getMessage();    //works OK
> Address addr = message.getFrom(); //  BREAKS here
> }

What do you mean by "BREAKS" ?
If you have an exception please paste it. If you think there is an
exception but you don't see it try to increase the debug level to DEBUG
(open your server.xml and put DEBUG in the log-level="INFO" statements).

If BREAKS means something else please explain it.

Keep in mind that JAMES "Mail" object uses a wrapper to encapsulate the
MimeMessage so that the message itself could be loaded only when some
property for the MimeMessage is really needed (lazy loading). Maybe your
message is invalid and you get the error only when you try to load it.
The question is "where does the input message come from?"

Stefano

> HELP greatly appreciated?  SHould be a snap here as I have seen
> other mailet code do this...  
> TIA


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

Reply via email to