}
}
- private static boolean attempt(Message m) throws IOException {
+ public static boolean attempt(Message m) throws IOException {
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());
else headers.append(key + ": " + val + "\r\n");
}
Message message = new Message(null, null, new org.ibex.io.Stream(headers.toString() + "\r\n" + body));
- org.ibex.mail.protocol.SMTP.Outgoing.accept(message);
+ //org.ibex.mail.protocol.SMTP.Outgoing.accept(message);
+ boolean ok = org.ibex.mail.protocol.SMTP.Outgoing.attempt(message);
+ if (!ok) throw new JSExn("SMTP server rejected message");
return T;
}
if (name.equals("mail.forward")) { return new Target() {