You need to download the JavaMail API, and put the relevant jar files in your classpath.
JavaMail API (compat)2,679 usages. javax.mail » mailCDDLGPL. JavaMail API (compat). Last Release on Mar 5, 2013. 2. JavaMail API JAR488 usages.
The javax.mail package defines classes that are common to all mail systems. The javax.mail.internet package defines classes that are specific to mail systems ...
When I compile a simple code that has the following 2 import statements: import javax.mail.*.
Error is self explainatory: javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;. You have no SMTP server on localhost, ...