catch null envelopeTos
[org.ibex.mail.git] / 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());