ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Lévy-Lambert <>
Subject AW: Mail Task
Date Sat, 18 Oct 2003 11:39:07 GMT
Hi Luis,

at first glance your usage of the mail task is OK.

Can you run ant in verbose mode (ant -verbose) and have a look at the

Maybe you will already be able to figure out by yourself what went wrong.

If not, post to the list the output of ant -verbose.

Also try to send the same email as plain mail (encoding="plain" instead of
encoding="mime") and see if it works better.

You can also try :
telnet 25

to see if you seem a welcome message like



-----Urspr√ľngliche Nachricht-----
Von: Conelly, Luis (EM, DDEMESIS) []
Gesendet: Samstag, 18. Oktober 2003 00:38
Betreff: Mail Task

Hi all.

	I am trying to create a mail task which has to send a message and a .jar
file as attachment. I looked into Ant User Manual, and my task was defined
pretty much like the sample from this page. But it seems like it is not
working. Whey I try to execute it, I got following error:

C:\Projects>ant sendJar
Buildfile: build.xml

     [echo] 20031017 - 1634

     [mail] Sending email: Ready For JTest!
     [mail] Failed to send email

file:C:/Projects/build.xml:177: Problem while sending mime mail:

Total time: 3 seconds

Also, I looked into past mails @, but I
just find quite a few references and I couldn't find nothing very useful.

	This is how my task is defined

    <target name="init">
        <echo message="${DSTAMP} - ${TSTAMP}" />

    <target name="sendJar" depends="init">
        <mail mailhost="" mailport="25" encoding="mime"
subject="Ready For JTest!">
            <from address=""/>
            <to address=""/>
               Application is ready to be tested on JTest.
		   All files have been updated in DEV server
               at ${ftp.remote.base.dir} directory.
               Furthermore, attached to this mail you
               will find the latest version of .jar file.
               Any comments, please reply to this address.
            <fileset dir="${dist}/lib/${DSTAMP}">
                <include name="**/*.jar"/>

	I am sure this mailhost is working, because I implemented another task
(rebuild), which sends notification mails when build fails (by using task). Furthermore, I have the
activation and mail jars in my classpath and Ant can reach them.

This is how my environment is configured:

OS: Win2K SP3 (not too proud of this)
JDK: java version "1.3.1"
     Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
     Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)
Ant: 1.5.2

	Any clue about this? Some other place I can look for?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message