massive robustness overhaul
[org.ibex.mail.git] / src / org / ibex / mail / protocol / SMTP.java
index 6d4aba2..a26b2b9 100644 (file)
@@ -1,3 +1,7 @@
+// Copyright 2000-2005 the Contributors, as shown in the revision logs.
+// Licensed under the Apache Public Source License 2.0 ("the License").
+// You may not use this file except in compliance with the License.
+
 package org.ibex.mail.protocol;
 import org.ibex.mail.*;
 import org.ibex.mail.target.*;
@@ -104,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);
                        }
@@ -191,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();