Hi ,
I need to send an email on submission of a form. I tested on my local box with a
jsp containing form and a
servlet handling that request and sending a mail using JavaMail API. I used the company's mail server and it worked fine.
But, when i placed the same code on the
test server ( i mean deployed on the test) it is not coming up and throwing an exception as :
javax.mail.SendFailedException: Sending failed;
nested exception is: class javax.mail.MessagingException: Exception reading response;
nested exception is: java.net.SocketException: Connection reset at javax.mail.Transport.send0(Transport.java:218) at javax.mail.Transport.send(Transport.java:80) at com.ElectronicInvoicing.ElectronicInvoicingServlet.doPost(ElectronicInvoicingServlet.java:67)
The code at line 67 is Transport.send(msg);
where msg is the message object with some simple text.
Can anyone help me in this? I tried to change the host to test whether everything is ok with it or not ? then it gave an exception saying Unknown Host.
So, it is able to recognize the host.
Thankyou,
Phani.