Well, you seem to be forgetting the mail server you want to use to send the
e-mail.. With your current settings, it will try and use localhost to send
the message and unless you happen to be running a mail server on your
computer that could be why it is failing. Here's the code I use:
<mail from="[EMAIL PROTECTED]"
tolist="multiple comma seperated values"
files="../distinfo.txt,../prod/changes.txt,future.txt"
mailhost="smtp server"
subject="build b000${build} uploaded"
/>
Also, for some reason the mail task will not allow you to use the message
and files attributes at the same time. When I tried this I got either one
or the other but never both. The way I solved this problem was that I
created a template called distinfo.txt and replaced certain values in the
file at build time and then the contents of all of the files are combined
in the body of the e-mail.
Good Luck,
-- Kevin
At 05:00 PM 4/4/2001 -0700, you wrote:
>Hi
>
>IM trying to send out email to myself using the following code in my
>build.xml, but this doesnt seem to work.
>
> <target name="mail">
> <mail from="[EMAIL PROTECTED]"
> tolist="[EMAIL PROTECTED]"
> subject="Results of test build"
> message="Please read through the contents"
> files="d:\jakarta-ant-1.3\build.txt"/>
> </target>
>
>What am i doing wrong. Is there a better method of sending emails about the
>build results.
>
>Thanks
>-Vinay