<p>I've been running the built-in <a href="http://ant.apache.org/" rel="nofollow noreferrer">Ant</a> from the command line on a Macintosh (10.5.5) and have run into some trouble with the <strong>Mail</strong> task. Running the Mail task produces the following message:</p>

<pre><code>[mail] Failed to initialise MIME mail: org.apache.tools.ant.taskdefs.email.MimeMailer
</code></pre>

<p>This is most likely due to a missing ant-javamail.jar file in the /usr/share/ant/lib directory. I see a "ant-javamail-1.7.0.pom" file in this directory but not the appropriate jar file. Anyone know why this jar file might be missing and what the best way to resolve the problem is?</p>

Download the Java Mail libraries from:
http://java.sun.com/products/javamail/
.
You will also need
http://java.sun.com/products/javabeans/glasgow/jaf.html
A list of all external dependencies required by Ant's optional tasks are outlined here
http://ant.apache.org/manual/index.html
.
Another way to get dependencies for Ant very easily, is to run:
```
```
ant -f fetch all
```
```
from $ANT_HOME. You can also run -projecthelp for a full list of targets:
```
```
all         load all the libraries
 antlr       load antlr libraries
 bcel        load bcel libraries
 beanshell   load beanshell support
 bsf         load bsf libraries
 debugging   internal ant debugging
 get-m2      Download the Maven2 Ant tasks
 jdepend     load jdepend libraries
 jruby       load jruby
 junit       load junit libraries
 jython      load jython
 logging     load logging libraries
 networking  load networking libraries (commons-net; jsch)
 regexp      load regexp libraries
 rhino       load rhino
 script      load script languages
 xerces      load an updated version of Xerces
 xml         load full XML libraries (xalan, resolver)
```
```