SmtpClient c = new SmtpClient( server ); c.from( sender ); c.to( recipient ); PrintStream p = c .startMessage(); p.println( "" ); p.println( "Subject: Test of SMTP Server" ); p.println( "" ); p.println( "Hi" ); c.closeServer();