Reputation: 161
I have written a java program to send a mail and it is working fine but sometimes i get this error , please advise what this error is about and how can i overcome from this
javax.mail.StoreClosedException: * BYE JavaMail Exception: java.net.SocketException: Connection reset
Upvotes: 1
Views: 1157
Reputation: 29961
Networks fail, you need to be prepared to handle it.
Why exactly it's failing in this case is hard to say. The server could be closing the connection because it's overloaded. Your firewall could be closing the connection because it's out of resources. Your router could be failing. The list goes on and on.
The JavaMail debug output might provide more clues, but most likely you'll need to do some low level network debugging if you really want to know why.
Upvotes: 1