Reputation: 26212
I've got this ant task working(sending email) on my machine :
<project name="send_mail_test" default="send_mail_test">
<property name="report" value="${report}" />
<property name="build" value="${build}" />
<property name="env" value="${env}" />
<property name="resultFile" value="${resultFile}" />
<target name="send_mail_test">
<mail encoding="mime" mailhost="mailserver.intranet.lan" subject="[REPORT] ${build} on ${env} environment - Test report" tolist="[email protected]">
<!-- FROM and REPLY TO email addresses -->
<from address="[email protected]"/>
<replyto address="[email protected]"/>
<message>Some body message
</message>
<attachments>
<fileset dir="${report}" includes="${resultFile}.html"/>
</attachments>
</mail>
</target>
</project>
This is how I start the above script to run(send_mail.xml) :
ant -f send_mail.xml -Dreport=C:\TESTING\results -Denv=DEV -Dbuild=1.0.1 -DresultFile=result-2012-07-17-11-03-25.html
It's successful from my computer(windows 7), but from another windows xp it's not. This is the error that I get :
Buildfile: C:\TESTING\setup\send_mail.xml
send_mail_test:
[mail] Sending email: [REPORT] C:\TESTING\results on DEV environment - Test report
[mail] Failed to send email: Could not connect to SMTP host: mailserver.intranet.lan, port: 25
BUILD FAILED
C:\TESTING\setup\send_mail.xml:8: Problem while sending mime mail:
Total time: 0 seconds
I realize that I cannot connect to the mailserver, but what do I do? What do I take a look at the possible reason for not being able to connect?
SOLUTION : I installed linux on this box.
Upvotes: 1
Views: 1935
Reputation: 2146
Upvotes: 1