Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in Sending Mail Using Sockets

 
Raghavendra Rao Damojipurapu
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am trying to send a mail using Socket in my jsp.The mail is going but some times the jsp is hanging.Why I am not able to figure out.I have kept log statements and came to know the server response as follows :
--------------------------------------------------------------------------
responseline = 250 2.1.0 <cbalakrishna@lucent.com>... Sender ok
responseline = 250 2.1.5 <cbalakrishna@lucent.com>... Recipient ok
responseline = 250 2.1.5 <test2>... Recipient ok
responseline = 354 Enter mail, end with "." on a line by itself
responseline = 250 2.0.0 k22CICD21051 Message accepted for delivery
responseline = 503 5.0.0 Need MAIL before RCPT
responseline = 503 5.0.0 Need MAIL before RCPT
responseline = 503 5.0.0 Need MAIL command
responseline = 500 5.5.1 Command unrecognized: "To: Balakrishana <cbalakrishna@lucent.com>"
responseline = 500 5.5.1 Command unrecognized: "To: test2 <test2>"
responseline = 500 5.5.1 Command unrecognized: "Subject: Test"
responseline = 500 5.5.1 Command unrecognized: "All, "
responseline = 500 5.5.1 Command unrecognized: ""
responseline = 500 5.5.1 Command unrecognized: ""
responseline = 500 5.5.1 Command unrecognized: "The following recognition is submitted: "
responseline = 500 5.5.1 Command unrecognized: ""
responseline = 500 5.5.1 Command unrecognized: ""
responseline = 500 5.5.1 Command unrecognized: "Nominating Colleague: t1"
responseline = 500 5.5.1 Command unrecognized: "Nominating Colleague Email: t1"
responseline = 500 5.5.1 Command unrecognized: "Nominee Name: t1"
responseline = 500 5.5.1 Command unrecognized: "Nominee Email: t1@lucent.com"
responseline = 500 5.5.1 Command unrecognized: "Supervisor Name: test1"
responseline = 500 5.5.1 Command unrecognized: "Supervisor Email: test2"
responseline = 500 5.5.1 Command unrecognized: "Nomination Type: Extra Mile"
responseline = 500 5.5.1 Command unrecognized: "Accomplishment: test data on march 2nd 12345"
responseline = 500 5.5.1 Command unrecognized: ""
responseline = 500 5.5.1 Command unrecognized: ""
responseline = 500 5.5.1 Command unrecognized: "."
responseline = 221 2.0.0 ihgp.ih.lucent.com closing connection
responseline = null
--------------------------------------------------------------------------

Why I am getting 503(i.e DISORDER OF THE COMMANDS) error i dont know because the commands i have used are in perfect order like HELO, MAIL, RCPT TO, DATA, '.', QUIT.
I am getting the above log when the jsp is not hanging.
when the jsp hangs I am getting the log up to the statement below :
responseline = 503 5.0.0 Need MAIL command


can anyone plz help me
I am badly stuck here
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

Not a direct answer, but is there a particular reason you're not using an existing mail client library like Commons Net? (I'll leave aside for the moment that it is considered bad design to do this kind of thing in a JSP page, and not in a bean or a servlet.)
[ March 02, 2006: Message edited by: Ulf Dittmer ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic