Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Throw exception if mail server doesn�t respond  RSS feed

Jeppe Sommer
Ranch Hand
Posts: 270
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am using javaMail API to send e-mails from a web application.

How can I throw an exception if the e-mail server does not respond within i.e. 2-3 seconds after calling the method Transport.send(msg);

I sometimes experiences that there is no connection or I get a slow response time from the e-mail server and the browser is just loading until the message is sent or it throws an SendFailedException, but it takes to long time?!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!