File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
Bartender

Joined: Oct 14, 2005
Posts: 18110
    
    8

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
 
Similar Threads
Ant tasks to weblogic
Microsoft Exchange
Problem: failed to create task or type for Cause: The name is undefined.
Junit and Emma
Java Mail With Outlook