I have the following XML structure:
<servers>
<hostname>ABC01</hostname>
<hostname>ABC02</hostname>
</servers>
I need to retrieve a file from each server, from a folder I know, attach it to an email and then send it.
What would be the approach for this?
Thanks.
Use the
xmlpropertytask to load an XML file into properties.Then use the
fortask from ant-contrib to act upon each of the matched properties.Something like:
Fetching files depends upon how you are planning to access them. The
scptask might help.For sending email you can use the
mailtask.