Hello, In general you can send emails from Ant using <mail> task. However, it is not useful for emailing the status of the build, because the build may fail and stop before reaching the target with <mail> task, i.e. in case of failure you will not receive an email.
--- Deep Chand <[EMAIL PROTECTED]> wrote: > Hello community, > > I'm a newbie to Ant. I tried to search for this > solution but couldn't find. > > I want to send emails with the status of the build > and with logs if > there are errors. I'm able to send email and also > the build process > works but I'm not able to figure out how to write > the error logs in a > file from the ant script. I am aware of the following general ways: - start ant with -logfile option like ant mytarget -l mylogfile.log - use <record> task [2]. It is a flexible way to log only a portion of the build script - use pipes like ant mytarget > mylogfile.log > Is there any task that can interpret the log > file or do I have to define a custom task? I guess > this should be a > very common problem ...so what's the recommended > practice. Thanks in advance. The recommended practice for mailing the build output is using MailLogger [3]. It is used like ant -logger org.apache.tools.ant.listener.MailLogger For the whole concepts of Ant loggers and listeners see [4]. Regards Ivan [1]http://ant.apache.org/manual/CoreTasks/mail.html [2]http://ant.apache.org/manual/CoreTasks/recorder.html [3]http://ant.apache.org/manual/listeners.html#MailLogger [4]http://ant.apache.org/manual/listeners.html __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]