voodoodyne / subethasmtp

SubEtha SMTP is a Java library for receiving SMTP mail
Other
344 stars 138 forks source link

SimpleMessageListenerAdapter.data and SimpleMessageListener.deliver do not declare RejectException #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This prevents using RejectException to provide custom SMTP error code.

Original issue reported on code.google.com by kamil.po...@gmail.com on 13 Aug 2009 at 11:39

GoogleCodeExporter commented 9 years ago
The nature of SimpleMessageListenerAdapter is that many listeners can receive 
the data... if one of them can 
throw RejectException, it would screw things up for others.

If the adapter was restricted to a single listener, it would be possible for 
accept() to throw RejectException, but 
deliver() still could not because there will be one delivery per accepted 
address.

The appropriate solution to this is "don't use SimpleMessageListenerAdapter".  
Use the MessageHandler interface 
instead.

Original comment by lhori...@gmail.com on 4 Sep 2009 at 4:26