Author: noel
Date: Fri Jun  3 13:42:21 2005
New Revision: 179880

URL: http://svn.apache.org/viewcvs?rev=179880&view=rev
Log:
JAMES-358.  If there are no valid addresses left, abort sending.

Modified:
    
james/server/trunk/src/java/org/apache/james/transport/mailets/RemoteDelivery.java

Modified: 
james/server/trunk/src/java/org/apache/james/transport/mailets/RemoteDelivery.java
URL: 
http://svn.apache.org/viewcvs/james/server/trunk/src/java/org/apache/james/transport/mailets/RemoteDelivery.java?rev=179880&r1=179879&r2=179880&view=diff
==============================================================================
--- 
james/server/trunk/src/java/org/apache/james/transport/mailets/RemoteDelivery.java
 (original)
+++ 
james/server/trunk/src/java/org/apache/james/transport/mailets/RemoteDelivery.java
 Fri Jun  3 13:42:21 2005
@@ -463,14 +463,13 @@
                     log(logMessageBuffer.toString());
                     return true;
                 } catch (SendFailedException sfe) {
-                    if (sfe.getValidSentAddresses() == null
-                          || sfe.getValidSentAddresses().length < 1) {
-                        if (isDebug) log("Send failed, continuing with any 
other servers");
+                    if (sfe.getValidUnsentAddresses() != null
+                        && sfe.getValidUnsentAddresses().length > 0) {
+                        if (isDebug) log("Send failed, " + 
sfe.getValidUnsentAddresses().length() + " valid addresses remain, continuing 
with any other servers");
                         lastError = sfe;
                         continue;
                     } else {
-                        // If any mail was sent then the outgoing
-                        // server config must be ok, therefore rethrow
+                        // There are no valid addresses left to send, so 
rethrow                                                                         
                         
                         throw sfe;
                     }
                 } catch (MessagingException me) {



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

Reply via email to