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="[EMAIL PROTECTED]"/>
            <to address="[EMAIL PROTECTED]"/>
            <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?

Luis G Conelly
Mobile +52 (449)123-8749
There are 10 kinds of programmers:
* Those who know binary code
* Those who does not

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to