major revamp due to new Message constructors
[org.ibex.mail.git] / src / org / ibex / mail / MailingList.java
index f6ceb3d..9beac91 100644 (file)
@@ -13,6 +13,7 @@ import java.net.*;
 import javax.servlet.*;
 import javax.servlet.http.*;
 
+// FEATURE: store interesting/important stuff in sqlite
 public class MailingList extends Mailbox.MailboxWrapper {
 
     // FIXME
@@ -202,7 +203,7 @@ public class MailingList extends Mailbox.MailboxWrapper {
             
             for(Subscriber s : subscribers()) try {
                     Log.warn(MailingList.class, "  trying " + s.address);
-                    SMTP.enqueue(Message.newMessage(m, m.envelopeFrom, s.address));
+                    SMTP.enqueue(m.withEnvelope(m.envelopeFrom, s.address));
                     Log.warn("[list]", "successfully sent to " + s);
                 } catch (Exception e2) { Log.error("[list]", e2); }
         } catch (Exception e) { throw new RuntimeException(e); }