catch null envelopeTos
authoradam <adam@megacz.com>
Sat, 30 Oct 2004 22:51:00 +0000 (22:51 +0000)
committeradam <adam@megacz.com>
Sat, 30 Oct 2004 22:51:00 +0000 (22:51 +0000)
darcs-hash:20041030225100-5007d-cde19aa98f9fd3d7494236e1d67117c3d19be11a.gz

src/org/ibex/mail/protocol/SMTP.java

index 3101f3f..6d4aba2 100644 (file)
@@ -145,6 +145,10 @@ public class SMTP {
         }
 
         public static boolean attempt(Message m) throws IOException {
+            if (m.envelopeTo == null) {
+                Log.warn(SMTP.Outgoing.class, "aieeee, null envelopeTo: " + m.summary());
+                return false;
+            }
             InetAddress[] mx = getMailExchangerIPs(m.envelopeTo.host);
             if (mx.length == 0) {
                 Log.warn(SMTP.Outgoing.class, "could not resolve " + m.envelopeTo.host + "; bouncing it\n" + m.summary());