You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Norman Maurer <nm...@byteaction.de> on 2006/03/10 08:17:01 UTC

mailet thats splits email

Hi,

i wrote a mailet thats split the email in single emails per recipient.
But sometimes i get this error for example:



We were unable to deliver the attached message because of an error in
the mail server.

Message details:
  Subject: FAILED: AS29562
  Sent date: Fri Mar 10 06:51:48 CET 2006
  MAIL FROM: null
  RCPT TO: nm@byteaction.de
  From: RIPE Database Administration <ri...@ripe.net> 
  To: nm@byteaction.de 
  Size (in bytes): 2044


In the deadletter table is nothing usefull insert.. 

Anyone can give me a hint whats the problem ?

I attached the mailet.

bye



Re: mailet thats splits email

Posted by Stefano Bagnara <ap...@bago.org>.
Norman Maurer wrote:
> i wrote a mailet thats split the email in single emails per recipient.
> But sometimes i get this error for example:
> 
> We were unable to deliver the attached message because of an error in
> the mail server.

Look into your logs.
Usually James log an exception when sending similar messages.

Stefano


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: mailet thats splits email

Posted by Stefano Bagnara <ap...@bago.org>.
Norman Maurer wrote:
> Ok i see a NullPointer exception in the spool log.
> 
> The NullPointer is thrown when do :
> 
> String sender = mail.getSender().toString().toLowerCase();
> 
> how can that throw a nullpointer ?

This throws an NPE when mail is null or mail.getSender() return null.
toString() should not be null for a non null object.

Stefano


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: mailet thats splits email

Posted by Norman Maurer <nm...@byteaction.de>.
thx for the help :-)

Am Freitag, den 10.03.2006, 16:28 +0100 schrieb Stefano Bagnara:
> Norman Maurer wrote:
> > Ok i see a NullPointer exception in the spool log.
> > 
> > The NullPointer is thrown when do :
> > 
> > String sender = mail.getSender().toString().toLowerCase();
> > 
> > how can that throw a nullpointer ?
> 
> This throws an NPE when mail is null or mail.getSender() return null.
> toString() should not be null for a non null object.
> 
> Stefano
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
> 
> 

Re: mailet thats splits email

Posted by Norman Maurer <nm...@byteaction.de>.
Ok i see a NullPointer exception in the spool log.

The NullPointer is thrown when do :

String sender = mail.getSender().toString().toLowerCase();

how can that throw a nullpointer ?

bye

Am Freitag, den 10.03.2006, 15:39 +0100 schrieb Stefano Bagnara:
> Norman Maurer wrote:
> > i wrote a mailet thats split the email in single emails per recipient.
> > But sometimes i get this error for example:
> > 
> > We were unable to deliver the attached message because of an error in
> > the mail server.
> 
> Look into your logs.
> Usually James log an exception when sending similar messages.
> 
> Stefano
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
> 
> 

Re: mailet thats splits email

Posted by Norman Maurer <nm...@byteaction.de>.
Which log ?

I found no erros in log. I looked in mailet log.

bye

Am Freitag, den 10.03.2006, 15:39 +0100 schrieb Stefano Bagnara:
> Norman Maurer wrote:
> > i wrote a mailet thats split the email in single emails per recipient.
> > But sometimes i get this error for example:
> > 
> > We were unable to deliver the attached message because of an error in
> > the mail server.
> 
> Look into your logs.
> Usually James log an exception when sending similar messages.
> 
> Stefano
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
> 
>