Client
public static DataOutputStream toServer = null; Socket SMTPSocket; SMTPSocket = new Socket("localhost", 222); toServer = new DataOutputStrea