massive robustness overhaul
[org.ibex.mail.git] / src / org / ibex / mail / protocol / SMTP.java
index b70b5f7..a26b2b9 100644 (file)
@@ -108,7 +108,7 @@ public class SMTP {
                         String body = buf.toString();
                         Message m = null;
                         for(int i=0; i<to.size(); i++) {
-                           m = Message.newMessage(new Stream(body), from, (Address)to.elementAt(i));
+                           m = Message.newMessage(new Fountain.StringFountain(body), from, (Address)to.elementAt(i));
                             if (!m.envelopeTo.isLocal()) Outgoing.accept(m);
                             else                         Target.root.accept(m);
                        }
@@ -195,7 +195,7 @@ public class SMTP {
                 conn.println("MAIL FROM:<" + m.envelopeFrom.user + "@" + m.envelopeFrom.host+">");  check(conn.readln(), conn);
                 conn.println("RCPT TO:<"   + m.envelopeTo.user + "@" + m.envelopeTo.host+">");      check(conn.readln(), conn);
                 conn.println("DATA");                          check(conn.readln(), conn);
-                Stream stream = new Stream(m.toString());
+                Stream stream = m.getStream();
                 boolean inheaders = true;
                 while(true) {
                     String s = stream.readln();