I just tried that. I downloaded mail-1.4.jar from Sun, put it in ~ant/lib, created a symbolic link from mail.jar -> mail-1.4.jar, and still get the same message. Here's the message with "debug". I do get something else with "debug" -- a missing antlib.xml:
$ ~ant/bin/ant -debug -f mail.xml Apache Ant version 1.7.0 compiled on December 13 2006 Buildfile: mail.xml Adding reference: ant.PropertyHelper Detected Java version: 1.4 in: /usr/local/jdk1.4.2_06/jre Detected OS: Linux Adding reference: ant.ComponentHelper Setting ro project property: ant.file -> /home/build/bin/mail.xml Adding reference: ant.projectHelper Adding reference: ant.parsing.context Adding reference: ant.targets parsing buildfile /home/build/bin/mail.xml with URI = file:/home/build/bin/mail.xml Setting ro project property: ant.project.name -> test Adding reference: test Setting ro project property: ant.file.test -> /home/build/bin/mail.xml Project base dir set to: /home/build/bin +Target: +Target: test Attempting to create object of type org.apache.tools.ant.helper.DefaultExecutor Adding reference: ant.executor Build sequence for target(s) `test' is [test] Complete build sequence is [test, ] test: [antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found. [mail] Failed to initialise MIME mail: javax/activation/DataSource BUILD SUCCESSFUL Total time: 0 seconds [EMAIL PROTECTED]:~/bin On 6/12/07, Saurabh Dave <[EMAIL PROTECTED]> wrote:
Download the Activation.jar and mail.jar and copy in ant Lib folder... -----Original Message----- From: David Weintraub [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 12, 2007 3:26 AM To: Ant Users List Subject: Mail failing in build.xml file I have a very straight forward build.xml file: <project name="test" default="test" basedir="."> <target name="test"> <mail from="[EMAIL PROTECTED]" subject="Test Email" mailhost="192.168.128.100" user="dweintraub" password="xxxxxxxx" message="This is a test email" failonerror="true"> <to name="David Weintraub" address="[EMAIL PROTECTED]"/> </mail> </target> </project> When I attempt to execute it, I get the following error message: test: [mail] Failed to initialise MIME mail: javax/mail/MessagingException BUILD SUCCESSFUL Which is strange because I set "failonerror" to "true". Any ideas? I am currently sending mail via CruiseControl and that works (and where I got the parameters from) so I know that it is possible to send email from this machine. -- David Weintraub [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- -- David Weintraub [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]