title: SMTP client Java program
body: <p>I am totally new to Java Mail. I first wanted to execute the program (which I had through my seniors) and see whether everything is working fine. So when I compile that code I get errors with all the class and packages of Java mail being not found.</p>
  <p>Could anyone please list out the things that I need for my program to compile and execute without any problems. I had downloaded the &quot;Java Mail 1.4.5&quot; but there was no installer file in that?</p>
  <p>I have Java 1.6 and Windows XP</p>
  <p>Please help.</p>
  <p>Errors :</p>
  <pre class="lang-sh prettyprint-override"><code>C:\&gt;javac SMTPClient.java
  SMTPClient.java:2: package javax.mail does not exist
  import javax.mail.*;
  ^
  SMTPClient.java:3: package javax.mail.internet does not exist
  import javax.mail.internet.*;
  ^
  SMTPClient.java:18: cannot find symbol
  symbol  : class Session
  location: class SMTPClient
          Session session = Session.getDefaultInstance(properties);
          ^
  SMTPClient.java:18: cannot find symbol
  symbol  : variable Session
  location: class SMTPClient
          Session session = Session.getDefaultInstance(properties);
                            ^
  SMTPClient.java:21: cannot find symbol
  symbol  : class MimeMessage
  location: class SMTPClient
          MimeMessage message = new MimeMessage(session);
          ^
  SMTPClient.java:21: cannot find symbol
  symbol  : class MimeMessage
  location: class SMTPClient
          MimeMessage message = new MimeMessage(session);
                                    ^
  SMTPClient.java:25: cannot find symbol
  symbol  : class InternetAddress
  location: class SMTPClient
          message.setFrom(new InternetAddress(from));
                              ^
  SMTPClient.java:28: package Message does not exist
          message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
  
                                      ^
  SMTPClient.java:28: cannot find symbol
  symbol  : class InternetAddress
  location: class SMTPClient
          message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
  
                                                             ^
  SMTPClient.java:40: cannot find symbol
  symbol  : class Transport
  location: class SMTPClient
  Transport t = session.getTransport(&quot;smtps&quot;);
  ^
  10 errors
  </code></pre>