You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by David Weintraub <qa...@gmail.com> on 2007/06/11 23:56:29 UTC

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="dweintraub@solbright.com"
            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="dweintraub@solbright.com"/>
        </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
qazwart@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: Mail failing in build.xml file

Posted by "Rebhan, Gilbert" <Gi...@huk-coburg.de>.
 
Hi,

-----Original Message-----
From: Priest, James (NIH/NIEHS) [C] [mailto:PriestJ@niehs.nih.gov] 
Sent: Tuesday, June 12, 2007 1:57 PM
To: Ant Users List
Subject: RE: Mail failing in build.xml file

/*
I get this error as well but the email still gets sent. Using Ant 1.6.5
(within Eclipse) on WinXP...
*/

if you have tasks with jar dependencies in eclipse, you have to
make your jars available for the eclipse ant plugin =

Window | Preferences | Ant | Runtime | Global Entries

or change the default ANT_HOME and put your jars in
your own ANT_HOME/lib folder, but that makes problems with
the ant editor;  i believe you have to delete the
xercesImpl.jar and xml-apis.jar then to make it work in eclipse;
but i'm not sure whether you have to delete both  jars
, just google for eclipse+ant+xercesImpl.jar


But still some tasks don't work properly in eclipse,
always check outside of eclipse in such cases.


Regards, Gilbert

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: Mail failing in build.xml file

Posted by Saurabh Dave <sa...@patni.com>.
Have you copied the mail.jar and activation.jar in Ant Lib directory.....if
not then do it and Try...

-----Original Message-----
From: Priest, James (NIH/NIEHS) [C] [mailto:PriestJ@niehs.nih.gov] 
Sent: Tuesday, June 12, 2007 5:27 PM
To: Ant Users List
Subject: RE: Mail failing in build.xml file

> -----Original Message-----
> From: David Weintraub [mailto:qazwart@gmail.com] 
> 
> When I attempt to execute it, I get the following error message:
> 
> test:
>      [mail] Failed to initialise MIME mail: 
> javax/mail/MessagingException
> 
> BUILD SUCCESSFUL


I get this error as well but the email still gets sent. Using Ant 1.6.5
(within Eclipse) on WinXP...

sendMail:
     [mail] Failed to initialise MIME mail:
javax/mail/MessagingException
     [mail] Sending email: 'survey' build at revision 59 successful
     [mail] Sent email with 0 attachments
     [echo] Mail sent!

Jim

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: Mail failing in build.xml file

Posted by "Priest, James (NIH/NIEHS) [C]" <Pr...@niehs.nih.gov>.
> -----Original Message-----
> From: David Weintraub [mailto:qazwart@gmail.com] 
> 
> When I attempt to execute it, I get the following error message:
> 
> test:
>      [mail] Failed to initialise MIME mail: 
> javax/mail/MessagingException
> 
> BUILD SUCCESSFUL


I get this error as well but the email still gets sent. Using Ant 1.6.5
(within Eclipse) on WinXP...

sendMail:
     [mail] Failed to initialise MIME mail:
javax/mail/MessagingException
     [mail] Sending email: 'survey' build at revision 59 successful
     [mail] Sent email with 0 attachments
     [echo] Mail sent!

Jim

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Mail failing in build.xml file

Posted by Peter Reilly <pe...@gmail.com>.
On 6/11/07, David Weintraub <qa...@gmail.com> wrote:
> I have a very straight forward build.xml file:
>
> <project name="test" default="test" basedir=".">
>     <target name="test">
>         <mail
>             from="dweintraub@solbright.com"
>             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="dweintraub@solbright.com"/>
>         </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
>
>
--- Looking at the source code:
src/main/org/apache/tools/ant/taskdefs/email/EmailTask
> Which is strange because I set "failonerror" to "true".
This is a bug.
The code does not check the failonerror flag here and simply returns.
>> [mail] Failed to initialise MIME mail: javax/mail/MessagingException
This is due to "helpful" code in EmailTask,  a buildexception is
thrown by classloader utilities -
"Class org.apache.tools.ant.taskdefs.email.MimeMailer could not be
loaded because of an invalid dependency." with a cause exception:
 Caused by: java.lang.ClassNotFoundException: javax.mail.MessagingException
however EmailTask#logBuildException() only reports
the message in the cause by exception (javax.mail.MessagingException).

The root cause that can give this exception is a missing
javamail[anyversion].jar file.

you seem to be having problems getting the javamail.jar into
the right place (whatever ANT_HOME/lib that is used by
cruise control ?). Try at the command line.
(NOTE: for linux users, if you installed the jpackage version
of ant, the file /etc/ant.conf will override ANT_HOME for pre ant 1.7.0).

In the mean time, you can use the excellent classloader task
to add the javamail.jar to your project classloader:
from http://enitsys.sourceforge.net/ant-classloadertask/
   <typedef uri="antlib:net.jtools.classloadertask"
            resource="net/jtools/classloadertask/antlib.xml">
     <classpath>
       <fileset
         dir="${user.home}/tools/ant-classloader"
              includes="*.jar"/>
     </classpath>
   </typedef>


   <cl:classloader loader="project">
     <classpath>
       <fileset dir="${user.home}/tools/javamail/" includes="*.jar"/>
     </classpath>
   </cl:classloader>

   <mail ...>

Peter

>
> 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.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Mail failing in build.xml file

Posted by David Weintraub <qa...@gmail.com>.
It actually makes no difference what the JAR is called because Ant
probably puts all the JARs in the classpath, so it's the path
structure of each JAR that's important. As long as their is a
javax.activation.DataSource class, it should be found.

I'm going to dig in to see the actual class implementation and see
what could be wrong.

I did try copying mail-1.4.jar to mail.jar, but no go with that.

On 6/12/07, Scot P. Floess <fl...@mindspring.com> wrote:
> David:
>
> I don't exactly remember but I don't think a symlink will work to the
> jar file...  You may need to refer to the actual jar...  I seem to
> remember having some issue on Linux back in the day with regards to
> symlinks and jar files...
>
> Just for grins, try copying mail-1.4.jar to mail.jar and see if that
> works...
>
> David Weintraub wrote:
> > 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
> > build@build:~/bin
> >
> > On 6/12/07, Saurabh Dave <sa...@patni.com> wrote:
> >> Download the Activation.jar and mail.jar and copy in ant Lib folder...
> >>
> >> -----Original Message-----
> >> From: David Weintraub [mailto:qazwart@gmail.com]
> >> 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="dweintraub@solbright.com"
> >>             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="dweintraub@solbright.com"/>
> >>         </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
> >> qazwart@gmail.com
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> >> For additional commands, e-mail: user-help@ant.apache.org
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> >> For additional commands, e-mail: user-help@ant.apache.org
> >>
> >>
> >
> >
>
> --
> Scot P. Floess
> 27 Lake Royale
> Louisburg, NC  27549
>
> 252-478-8087 (Home)
> 919-392-6730 (Work)
>
> Chief Architect JPlate  http://sourceforge.net/projects/jplate
> Chief Architect JavaPIM http://sourceforge.net/projects/javapim
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>


-- 
--
David Weintraub
qazwart@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Mail failing in build.xml file

Posted by "Scot P. Floess" <fl...@mindspring.com>.
David:

I don't exactly remember but I don't think a symlink will work to the 
jar file...  You may need to refer to the actual jar...  I seem to 
remember having some issue on Linux back in the day with regards to 
symlinks and jar files...

Just for grins, try copying mail-1.4.jar to mail.jar and see if that 
works...

David Weintraub wrote:
> 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
> build@build:~/bin
>
> On 6/12/07, Saurabh Dave <sa...@patni.com> wrote:
>> Download the Activation.jar and mail.jar and copy in ant Lib folder...
>>
>> -----Original Message-----
>> From: David Weintraub [mailto:qazwart@gmail.com]
>> 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="dweintraub@solbright.com"
>>             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="dweintraub@solbright.com"/>
>>         </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
>> qazwart@gmail.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>>
>>
>
>

-- 
Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-392-6730 (Work)

Chief Architect JPlate  http://sourceforge.net/projects/jplate
Chief Architect JavaPIM http://sourceforge.net/projects/javapim


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Mail failing in build.xml file

Posted by Sann Maung <ya...@yahoo.com>.
Hi,

I just read this message. If you already have the
solution, sorry.

I think you need the (activation.jar) as well.

rgds,




--- David Weintraub <qa...@gmail.com> wrote:

> 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
> build@build:~/bin
> 
> On 6/12/07, Saurabh Dave <sa...@patni.com>
> wrote:
> > Download the Activation.jar and mail.jar and copy
> in ant Lib folder...
> >
> > -----Original Message-----
> > From: David Weintraub [mailto:qazwart@gmail.com]
> > 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="dweintraub@solbright.com"
> >             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="dweintraub@solbright.com"/>
> >         </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
> > qazwart@gmail.com
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> > For additional commands, e-mail:
> user-help@ant.apache.org
> >
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> > For additional commands, e-mail:
> user-help@ant.apache.org
> >
> >
> 
> 
> -- 
> --
> David Weintraub
> qazwart@gmail.com
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 



      ____________________________________________________________________________________
Luggage? GPS? Comic books? 
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Mail failing in build.xml file

Posted by David Weintraub <qa...@gmail.com>.
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
build@build:~/bin

On 6/12/07, Saurabh Dave <sa...@patni.com> wrote:
> Download the Activation.jar and mail.jar and copy in ant Lib folder...
>
> -----Original Message-----
> From: David Weintraub [mailto:qazwart@gmail.com]
> 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="dweintraub@solbright.com"
>             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="dweintraub@solbright.com"/>
>         </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
> qazwart@gmail.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>


-- 
--
David Weintraub
qazwart@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: Mail failing in build.xml file

Posted by Saurabh Dave <sa...@patni.com>.
Download the Activation.jar and mail.jar and copy in ant Lib folder... 

-----Original Message-----
From: David Weintraub [mailto:qazwart@gmail.com] 
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="dweintraub@solbright.com"
            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="dweintraub@solbright.com"/>
        </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
qazwart@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org