made newMessage a static method and Message() private
[org.ibex.mail.git] / src / org / ibex / mail / Confirmation.java
index c5e0022..f741890 100644 (file)
@@ -84,14 +84,13 @@ public abstract class Confirmation implements Externalizable {
     }
 
     public void signAndSend(long secret, Date now) throws IOException, Message.Malformed {
-        SMTP.Outgoing.accept(new Message(new Stream("From: "    + FROM + "\r\n" +
-                                                    "To: "      + who.toString(true) + "\r\n" +
-                                                    "Subject: confirm " + getDescription() + "\r\n" +
-                                                    "\r\n" +
-                                                    "Please click the link below to " + getDescription() + "\r\n" +
-                                                    sign(secret)),
-                                         new Message.Envelope(FROM, who, now)
-                                         )
+        SMTP.Outgoing.accept(Message.newMessage(new Stream("From: "    + FROM + "\r\n" +
+                                                           "To: "      + who.toString(true) + "\r\n" +
+                                                           "Subject: confirm " + getDescription() + "\r\n" +
+                                                           "\r\n" +
+                                                           "Please click the link below to " + getDescription() + "\r\n" +
+                                                           sign(secret)),
+                                                FROM, who)
                              );
     }