title: package javax.mail and javax.mail.internet do not exist
body: <p>When I compile a simple code that has the following 2 import statements:</p>
  
  <p><code>import javax.mail.*</code></p>
  
  <p><code>import javax.mail.internet.*</code></p>
  
  <p>I get the following message:</p>
  
  <p><code>package javax.mail does not exist</code> </p>
  
  <p><code>package javax.mail.internet does not exist</code></p>
  
  <p>Why do I get this error?</p>
  
  <p>Here is the code I have:</p>
  
  <pre><code>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) {
         }
   }
  }
  </code></pre>