public final Address from;
public static Envelope augment(Envelope e, MIME.Headers h) {
if (e.from != null && e.to != null) return e;
- Address to = e.to == null ? Address.parse(h.get("X-org.ibex.mail.headers.envelope.To")) : e.to;
- Address from = e.from == null ? Address.parse(h.get("X-org.ibex.mail.headers.envelope.From")) : e.from;
+ Address to = e.to == null ? Address.parse(h.gets("X-org.ibex.mail.headers.envelope.To")) : e.to;
+ Address from = e.from == null ? Address.parse(h.gets("X-org.ibex.mail.headers.envelope.From")) : e.from;
return new Envelope(from, to, e.arrival);
}
}
super(stream, null, false);
Vec resent = new Vec(), traces = new Vec();
this.envelope = Envelope.augment(envelope, headers);
- this.to = headers.get("To") == null ? envelope.to : Address.parse(headers.get("To"));
- this.from = headers.get("From") == null ? envelope.from : Address.parse(headers.get("From"));
- this.replyto = headers.get("Reply-To") == null ? null : Address.parse(headers.get("Reply-To"));
- this.subject = headers.get("Subject");
- this.messageid = headers.get("Message-Id");
- this.cc = Address.list(headers.get("Cc"));
- this.bcc = Address.list(headers.get("BCc"));
- this.date = parseDate(headers.get("Date"));
+ this.to = headers.gets("To") == null ? envelope.to : Address.parse(headers.gets("To"));
+ this.from = headers.gets("From") == null ? envelope.from : Address.parse(headers.gets("From"));
+ this.replyto = headers.gets("Reply-To") == null ? null : Address.parse(headers.gets("Reply-To"));
+ this.subject = headers.gets("Subject");
+ this.messageid = headers.gets("Message-Id");
+ this.cc = Address.list(headers.gets("Cc"));
+ this.bcc = Address.list(headers.gets("BCc"));
+ this.date = parseDate(headers.gets("Date"));
resent.copyInto(this.resent = new Hashtable[resent.size()]);
traces.copyInto(this.traces = new Trace[traces.size()]);
}