title: Build.xml is failing to send email, gives "java.lang.ClassNotFoundException: javax.mail.internet.MimeMessage" error
body: <p>Below is one of the targets that runs after the completion of tests, buil.xml(pass or fail). This target is failing and giving error "java.lang.ClassNotFoundException: javax.mail.internet.MimeMessage". So I expanded the mail.1.4.jar file and saw this class was there. So next I checked that this jar was there in my setclasspath target or not, and it was there. Third thing I checked that mail.1.4.jar was included in ant's path or not and it was there. Now I am not able to understand why I am getting this error.</p>
  
  <pre><code>&lt;target name="sendmail"&gt;
      &lt;mail from="[myname@company.com]"
      subject="Test Email" mailhost="smpt.gmail.com" 
      user="myusername" password="mypassword" message="This is a test email"&gt;
          &lt;to name="receivers name" address="[receiver@gmail.com]" /&gt;
      &lt;/mail&gt;
  &lt;/target&gt;
  </code></pre>