aspose file tools
The moose likes Ant, Maven and Other Build Tools and the fly likes Ant mail task - MS Exchange Server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Ant mail task - MS Exchange Server" Watch "Ant mail task - MS Exchange Server" New topic
Author

Ant mail task - MS Exchange Server

Jeff Storey
Ranch Hand

Joined: Oct 09, 2006
Posts: 118
Hi, is there any way I can use ant's mail task so it sends mail through a Microsoft Exchange server? Or is there an alternative to sending mail from an ant script that will allow me to connect to an Exchange server?

Thanks,
Jeff
Paul Clapham
Sheriff

Joined: Oct 14, 2005
Posts: 19680
    
  10

If Ant has a mail task then it should be possible to use it to send mail via any SMTP server. Exchange is an SMTP server.
Steven Deal
Greenhorn

Joined: Jun 11, 2004
Posts: 3
<target name="email">
<mail mailhost="mail.server" charset="UTF-8" user="you" password="pass"
subject="News for ${TODAY}"
tolist="${email.list}" cclist="${cc.list}">
<from address="you@yourco.com"/>
<message>Hello.</message>
<fileset dir="${basedir}">
<include name="Todays_Report.xls"/>
</fileset>
</mail>
</target>
There are a few required libraries, just see the mail task.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ant mail task - MS Exchange Server
 
It's not a secret anymore!