}
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());
}
private static void check(String s, Connection conn) {
- while (s.charAt(3) == '-') s = conn.readln();
+ while (s.length() > 3 && s.charAt(3) == '-') s = conn.readln();
if (s.startsWith("4")||s.startsWith("5")) throw new SMTPException(s);
}
private static boolean attempt(final Message m, final InetAddress mx) {