When I compile a simple code that has the following 2 import statements:
import javax.mail.*
import javax.mail.internet.*
I get the following message:
package javax.mail does not exist 
package javax.mail.internet does not exist
Why do I get this error?
Here is the code I have:
import javax.mail.*;
import javax.mail.internet.*;
import java.util.*;
class tester {
 public static void main(String args[]) {
   Properties props = new Properties();
   props.put("mail.smtp.com" , "smtp.gmail.com");
   Session session  = Session.getDefaultInstance( props , null);
   String to = "me@gmail.com";
   String from = "from@gmail.com";
   String subject = "Testing...";
   Message msg = new MimeMessage(session);
    try {
      msg.setFrom(new InternetAddress(from));
      msg.setRecipient(Message.RecipientType.TO , new InternetAddress(to));
      msg.setSubject(subject);
      msg.setText("Working fine..!");
    }  catch(Exception exc) {
       }
 }
}