What I did was write 2 files - build.xml does the actual build, but mail.xml
just uses the exec task to "call" build.xml and sent the output to a log
file, which is them mailed using the mail task. After I wrote this (my first
day using Ant) I realized I could change it to use the Ant task instead of
exec, I just haven't changed it yet.
<project name="Mail" default="mail" basedir="..">
<target name="mail">
<exec executable="ant.bat" dir="${basedir}/tools"
output="tools/build.log">
</exec>
<mail from="[EMAIL PROTECTED]" tolist="sdonie" subject="Results of nightly
build"
files="tools/build.log" mailhost="mailhost" />
</target>
</project>
> -----Original Message-----
> From: Sibon Barman [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 09, 2001 2:58 PM
> To: ant
> Subject: sending mail with build log file included
>
> Hi all,
> I have a question on how to create a buildfile that will allow me to send
> an email to load administrator at the end of the build with build log file
> included in that email. I know there is a built in task called Mail --- if
> somebody could send me a snippet of xml on how to to it, that would be
> great.
>
> Thanks,
>
> Sibon Barman
> SS8 Networks, Inc.
> Suite 500
> 495 March Road, Kanata,
> Ontario K2K 3G1
>
> *: (613)592-2100 ext:3281
> *: [EMAIL PROTECTED]
>
>