Thanks for that.... I am including the values c and d at every message which are CR and LF respectively.I am able to send the mail without any errors but i am unable to recieve in james. I am using jdk 1.1.8 to send this and james is using jdk1.5.Is that a problem?
----- Original Message ----- From: "Stefano Bagnara" <[EMAIL PROTECTED]> To: "James Users List" <server-user@james.apache.org> Sent: Thursday, January 26, 2006 5:08 PM Subject: Re: cannot send using smtp client > sundeep Gelli wrote: > > 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 > > I think that the output of all your println would help us ;-) > BTW There is no CRLF.CRLF in your message body. you never send the > termination char for the body code. > > Stefano > > > > 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 > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]