title: Failed to initialise MIME mail: javax/mail/MessagingException while running Ant Script
body: <p>I am trying to send email from Ant Script. here is the code snippet</p>
  
  <pre><code>&lt;mail mailhost="smtp.gmail.com" subject="Test Email" user="gmailUser" password="gmailPassword"&gt;
          &lt;from address="xxxxx@gmail.com" /&gt;
          &lt;to address="xxxxx@gmail.com" /&gt;
          &lt;message&gt;Test&lt;/message&gt;
      &lt;/mail&gt;
  </code></pre>
  
  <p>When I run this script, I am getting an exception </p>
  
  <pre><code> [mail] Failed to initialise MIME mail: javax/mail/MessagingException
  </code></pre>
  
  <p>Any Ideas?</p>
  
  <p>Note - Ant version in eclipse is 1.7 and I have added following jars to the build path</p>
  
  <pre><code>mail.jar
  dsn.jar
  imap.jar
  mailapi.jar
  pop3.jar
  smtp.jar
  </code></pre>