hi, I am a beginner and i am trying to send a mail to james using a simple smtp class.I followed all the smtp standards specified in smtphandler of james.But james is unable to recieve any mails from it. with outlook everything is going fine.What could be the problem? My code looks like this
try { System.out.println(InetAddress.getLocalHost()); socket1=new Socket("18.157.56.221",25); System.out.println("Connecting to host..........."+socket1.getRemoteSocketAddress().toString()); System.out.println("Local socket connection......."+socket1.getInetAddress().getHostName()); br= new BufferedReader(new InputStreamReader(socket1.getInputStream())); bw = new BufferedWriter (new OutputStreamWriter (socket1.getOutputStream())); ans=br.readLine(); System.out.println("Server Response1: " +ans); bw.write("helo ahmz"+c+d); bw.flush(); ans=br.readLine(); System.out.println("Server Response2 : " +ans); bw.write("MAIL FROM: <[EMAIL PROTECTED]>"+c+d); bw.flush(); ans=br.readLine(); System.out.println("Server Response3 : " +ans); bw.write("RCPT To: <[EMAIL PROTECTED]>"+c+d); bw.flush(); ans=br.readLine(); System.out.println("Server Response4 : " +ans); bw.write("Data"+c+d); bw.flush(); ans=br.readLine(); System.out.println("Server Response 5: " +ans); bw.write("HI frnd, how r u"); bw.write("."); bw.flush(); socket1.close(); System.out.println("Closed Connection with Server"); } catch(IOException e) {System.out.println("Error in Connecting to Port");} } } No error is being displayed from the server......Can anyone help me.I am using james 2.2.0 and jdk 1.5 Does james support jdk 1.1.8? Thanx in advance