Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem in Sending Mail Using Sockets

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
So I left, I came home, and I ate some pie. And then I read this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic