ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conelly, Luis (EM, DDEMESIS)" <Luis.Cone...@ge.com>
Subject RE: Mail Task
Date Mon, 20 Oct 2003 18:38:56 GMT
Thanks

	I figured out what was wrong, thanks to your suggestion.

	Regards

	Luis

-----Original Message-----
From: Antoine Lévy-Lambert [mailto:antoine@antbuild.com]
Sent: Saturday, October 18, 2003 6:39 AM
To: Ant Users List
Subject: AW: Mail Task


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
output.

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 3.211.64.14 25

to see if you seem a welcome message like

220 smtp.myisp.com ESMTP SMTPSVC(1.0.0.1)

Cheers,
Antoine

-----Urspr√ľngliche Nachricht-----
Von: Conelly, Luis (EM, DDEMESIS) [mailto:Luis.Conelly@ge.com]
Gesendet: Samstag, 18. Oktober 2003 00:38
An: user@ant.apache.org
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

init:
     [echo] 20031017 - 1634

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

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

Total time: 3 seconds
*****************************************************************

Also, I looked into past mails @ http://ant.apache.org/mail/user/, 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">
        <tstamp/>
        <echo message="${DSTAMP} - ${TSTAMP}" />
    </target>

    <target name="sendJar" depends="init">
        <mail mailhost="3.211.64.14" mailport="25" encoding="mime"
subject="Ready For JTest!">
            <from address="luis.conelly@ge.com"/>
            <to address="luis.conelly@ge.com"/>
            <message>
               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.
            </message>
            <fileset dir="${dist}/lib/${DSTAMP}">
                <include name="**/*.jar"/>
            </fileset>
        </mail>
    </target>
----------------------------------------

	I am sure this mailhost is working, because I implemented another task
(rebuild), which sends notification mails when build fails (by using
org.apache.tools.ant.listener.MailLogger 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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message