This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Java in General and the fly likes Unknown host exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Java in General
Bookmark "Unknown host exception" Watch "Unknown host exception" New topic

Unknown host exception

Nila dhan
Ranch Hand

Joined: Sep 15, 2005
Posts: 161
Hi pals,
I am trying to send email from my application .But the exception occurs

javax.mail.SendFailedException: Sending failed;
nested exception is:
javax.mail.MessagingException: Unknown SMTP host:

What could be wrong here.Any suggestions?

BTW if i send mail from another system using the same application,it works!!!
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42958
What do you specify as the SMTP host? It looks like it is not recognized or even empty.
Sandeep Murthy
Ranch Hand

Joined: Oct 05, 2005
Posts: 34
i) Check if you have the required jar files ( mailer.jar, activation.jar, ...) in your class path.
ii) Disable any antivirus program running while trying to send mails. The antivirus may be scanning the ports and block it.

SCJP 1.4
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Unknown host exception
jQuery in Action, 3rd edition