X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fibex%2Fmail%2FMessage.java;h=d6ef5388dc2bb6f3464b263fa17d83306321a00d;hb=7b0ee70e5808546d347872b9c6ff318f856eddaa;hp=46435f3eb27039ee46feb89bfdab1f719518507b;hpb=84fb12d742444760d08b9e9ad2f6176190b24df9;p=org.ibex.mail.git diff --git a/src/org/ibex/mail/Message.java b/src/org/ibex/mail/Message.java index 46435f3..d6ef538 100644 --- a/src/org/ibex/mail/Message.java +++ b/src/org/ibex/mail/Message.java @@ -100,6 +100,11 @@ public class Message extends MIME.Part { this.cc = Address.list(headers.get("Cc")); this.bcc = Address.list(headers.get("Bcc")); this.date = parseDate(headers.get("Date")) == null ? new Date() : parseDate(headers.get("Date")); + + // RFC2822 requires a "Date" field, so we synthesize one if missing + if (headers.get("Date") == null) + headers.set("Date", this.date.toString()); // FIXME: formatting + this.arrival = this.date; // FIXME wrong; grab this from traces? } @@ -127,7 +132,6 @@ public class Message extends MIME.Part { } // this is belived to be compliant with QSBMF (http://cr.yp.to/proto/qsbmf.txt) -v v v v v v v public Message bounce(String reason) { if (envelopeFrom==null || envelopeFrom.toString().equals("")) return null; @@ -160,27 +164,6 @@ v v v v v v v return null; } } -************* -v v v v v v v - public Message bounce(String reason) { - Log.warn(Message.class, "bounce not implemented"); - return null; - } // FIXME! - -************* - public Message bounce(String reason) { - Log.warn(Message.class, "bounce not implemented"); - } // FIXME! - -^ ^ ^ ^ ^ ^ ^ - public String summary() { - return - " Subject: " + subject + "\n" + - " EnvelopeFrom: " + envelope.from + "\n" + - " EnvelopeTo: " + envelope.to + "\n" + - " MessageId: " + messageid; - } -^ ^ ^ ^ ^ ^ ^ public String toString() { throw new RuntimeException("Message.toString() called"); } public String summary() { return "[" + envelopeFrom + " -> " + envelopeTo + "] " + subject; }