// soft line limit (suggested): 78 chars / hard line limit: 998 chars
// folded headers: can insert CRLF anywhere that whitespace appears (before the whitespace)
-// date/time parsing: see 3.3
+// date/time parsing: see spec, 3.3
// FEATURE: MIME RFC2045, 2046, 2049
// FEATURE: PGP-signature-parsing
public final Address envelopeFrom;
public final Address[] envelopeTo;
- public final Date arrival = null; // when the message first arrived at this machine
+ public final Date arrival; // when the message first arrived at this machine
public void dump(OutputStream os) throws IOException {
Writer w = new OutputStreamWriter(os);
w.flush();
}
+ /*
public static class StoredMessage extends Message {
public int uid;
public boolean deleted = false;
public boolean answered = false;
public StoredMessage(LineReader rs) throws IOException, MailException.Malformed { super(rs); }
}
+ */
public class Trace {
final String returnPath;
}
public static class Malformed extends MailException.Malformed { public Malformed(String s) { super(s); } }
- public Message(Address envelopeFrom, Address envelopeTo, LineReader rs) throws IOException, Malformed {
+ public Message(Address envelopeFrom, Address[] envelopeTo, LineReader rs) throws IOException, MailException.Malformed {
this.envelopeFrom = envelopeFrom;
this.envelopeTo = envelopeTo;
this.arrival = new Date();
}
}
- this.date = headers.get("Date");
+ this.date = (Date)headers.get("Date");
this.to = new Address((String)headers.get("To"));
this.from = new Address((String)headers.get("From"));
this.replyto = new Address((String)headers.get("Reply-To"));
if (headers.get("Cc") != null) {
StringTokenizer st = new StringTokenizer((String)headers.get("Cc"));
this.cc = new Address[st.countTokens()];
- for(int i=0; i<cc.length; i++) cc[i] = st.nextToken();
+ for(int i=0; i<this.cc.length; i++) this.cc[i] = new Address(st.nextToken());
} else {
this.cc = new Address[0];
}
if (headers.get("Bcc") != null) {
StringTokenizer st = new StringTokenizer((String)headers.get("Bcc"));
this.bcc = new Address[st.countTokens()];
- for(int i=0; i<bcc.length; i++) bcc[i] = st.nextToken();
+ for(int i=0; i<this.bcc.length; i++) this.bcc[i] = new Address(st.nextToken());
} else {
this.bcc = new Address[0];
}
public String summary() {
return
- " Subject: " + m.subject + "\n" +
- " EnvelopeFrom: " + m.envelopeFrom + "\n" +
- " EnvelopeTo: " + m.envelopeTo + "\n" +
- " MessageId: " + m.messageid;
+ " Subject: " + subject + "\n" +
+ " EnvelopeFrom: " + envelopeFrom + "\n" +
+ " EnvelopeTo: " + envelopeTo + "\n" +
+ " MessageId: " + messageid;
}
public Message bounce(String reason) {