If Your application has some code which sends email, You must have faced this exception some time.This exception has nothing to do with the Java Mail code. It is more related with the configurations and settings. Here is a checklist that You should check if You get this exception.
1) First of all try to ping the host which is said to be unknown.
2) If You don't get reply, which is obvious, try to repair the connection and try pinging.
3) If still no response, then try replacing smtp host with the DNS name or IP address of the SMTP server You wish to use.
4) Check if there is some new firewall on Your machine or on Your network that is preventing You from connecting.
Most probably, these tips will solve the problem and You will get rid off the exception. I did :)