Erica A Ramsey wrote:
hi, i am trying to mail file via ant. I wrote a simple test and it hangs.
here it is.

    <property name="mail.host" value="smtp.gmail.com" />
    <property name="mail.port" value="465" />
    <property name="mail.sender.address" value="[EMAIL PROTECTED]" />
    <property name="mail.sender.user"
value="[EMAIL PROTECTED]"/>
    <property name="mail.sender.password" value="..."/>
    <property name="mail.recipient.address"
value="[EMAIL PROTECTED]" />

    <!-- build and mail production version -->
    <target name="mailarchive" depends="">
        <mail mailhost="${mail.host}" mailport="${mail.port}" subject="latest
binaries of ${application.name} version ${version}" ssl="true"
user="${mail.sender.user}" password="${mail.sender.password}">
            <from address="${mail.sender.address}"/>
            <replyto address="${mail.sender.address}"/>
            <to address="${mail.recipient.address}"/>
            <message>Latest binaries for ${application.name} version
${version}</message>
        </mail>
    </target>



always look at the root cause

Caused by: javax.net.ssl.SSLException: Unsupported record version
Unknown-50.49
        at
com.sun.net.ssl.internal.ssl.InputRecord.readV3Record(InputRecord.java:375)
        at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:360)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:723
)


Now, I do have it working with gmail:
http://antbook.cvs.sourceforge.net/antbook/examples/diary/core/core-chapter-07.xml?view=markup


<target name="email-announcement-html" depends="checksum">
  <mail
    tolist="${email.to}"
    from="${email.from}"
    subject="New release of ${target.name}"
    mailhost="${email.server}"
    mailport="${email.port}"
    ssl="${email.ssl}"
    user="${email.user}"
    password="${email.password}"
    messageMimeType="text/html">
    <message><![CDATA[
<p>
  Here is a new build of ${target.name}
  The SHA1 checksum of the file is:
  </p>
  <pre>
      ${src.tar.sha1}
  </pre>
  <p><i>-The development team</i></p>
]]></message>
    <fileset file="${target.zip}" />
    <fileset file="${target.zip}.sha1" />
  </mail>
</target>

-you need the Java activation and mail jars in ANT_HOME/lib

these are the email properties I used
email.port=465
email.server=smtp.gmail.com
email.ssl=true
[EMAIL PROTECTED]
email.from=${email.user}
email.password=secret
[EMAIL PROTECTED]





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

Reply via email to