--- projects/cms/source/util/uk/org/iscream/cms/util/Smtp.java 2001/02/05 03:14:15 1.1 +++ projects/cms/source/util/uk/org/iscream/cms/util/Smtp.java 2001/02/05 04:03:07 1.2 @@ -10,7 +10,7 @@ import java.io.*; * for the GJT, and scaled to do just what we require. * * @author $Author: tdb $ - * @version $Id: Smtp.java,v 1.1 2001/02/05 03:14:15 tdb Exp $ + * @version $Id: Smtp.java,v 1.2 2001/02/05 04:03:07 tdb Exp $ */ public class Smtp { @@ -19,7 +19,7 @@ public class Smtp { /** * The current CVS revision of this class */ - public static final String REVISION = "$Revision: 1.1 $"; + public static final String REVISION = "$Revision: 1.2 $"; //---STATIC METHODS--- @@ -43,7 +43,8 @@ public class Smtp { public Smtp(String server, int port) throws IOException { _socket = new Socket(server, port); _socketIn = new BufferedReader(new InputStreamReader(_socket.getInputStream())); - _socketOut = new PrintWriter(_socket.getOutputStream()); + _socketOut = new PrintWriter(new BufferedWriter(new OutputStreamWriter(_socket.getOutputStream())), true); + _socketIn.readLine(); // get 220 welcome header sendCommand("HELO " + InetAddress.getLocalHost().getHostName(), 250); }