Log.warn(SMTP.Outgoing.class, "success: " + mx + " accepted " + m.summary() + "\n["+resp+"]");
accepted = true;
conn.close();
+ } catch (SMTPException e) {
+ if (accepted) return true;
+ Log.warn(SMTP.Outgoing.class, " unable to send; error=" + e);
+ Log.warn(SMTP.Outgoing.class, " message: " + m.summary());
+ Log.warn(SMTP.Outgoing.class, e);
+ if (e.code >= 500 && e.code <= 599) {
+ try {
+ accept(m.bounce("unable to deliver: " + e));
+ } catch (Exception ex) {
+ Log.error(SMTP.Outgoing.class, "very serious: exception while trying to deliver bounce");
+ Log.error(SMTP.Outgoing.class, ex);
+ }
+ return true;
+ }
+ return false;
} catch (Exception e) {
if (accepted) return true;
Log.warn(SMTP.Outgoing.class, " unable to send; error=" + e);