Hi, I have written a Java application that sends mail using JavaMail APIs. At a particular office where my application is installed its throwing the following exception
We have tested the Internet connection in the office and it works perfectly fine. We have also accessed the very account where the messages are sent through the application via a browser and it works smoothly. So can anyone let me know of the possible causes for such an exception being thrown? This is very urgent so please let me know at the earliest.
Hi Ketan I too had a similar exception when I was working with webservices. what I have seen is that when we try to re-open the URLs Connection when the server has still kept the connection alive. I could work it out with specifically "killing" the connection and reset it when ever I need to connect to the server... Hope this satisfies you or atleast gives you a lead into where exactly to look for errors...
Hey thanks for the prompt reply .... but the exception was thrown because of the firewall installed on the machine ... anyways I also trying to find help to help me connect to the Internet through a firewall ... can anyone help me in this case??
Hi - I'd talk to your network administrator. The chances are very good that he'll understand the problem - and what can be done about it - immediately. Otherwise, he would probably be able to help you take a network trace of the problem. Either way, he's probably the best person to talk to. Good luck .. PSM
Hi, I am actually looking at how (programatically) to make a connection to Internet via a proxy server? I basically want the JavaMail API to be able to access the mail server via a proxy server. I have tried using setting up system properties and there providing with the proxy server address and port but that does not seem to work. So I needed some help, in terms of documentation or tutorials or program codes to help me do that.
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.