ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Qazwart <qazw...@gmail.com>
Subject Re: mail task failure
Date Fri, 17 Aug 2007 01:04:06 GMT
I bet you're missing a JAR file. I had the same problem with the  
<mail> task.

Take a look at this page: <http://ant.apache.org/manual/ 
install.html#librarydependencies>
and search for the word "mail.jar". You'll notice that the <mail> is  
dependent upon this jar file, and it is not installed by default.

On Aug 16, 2007, at 8:37 PM, 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="my_account@gmail.com" />
>     <property name="mail.sender.user"
> value="my_gmail_account_name_here@abacomm.com.br"/>
>     <property name="mail.sender.password" value="..."/>
>     <property name="mail.recipient.address"
> value="send_to_me_at_this_email_address@wideopenwest.com" />
>
>     <!-- 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>
>
> OS: Windows XP SP2
> Ant version: Apache Ant version 1.7.0 compiled on December 13 2006
> java mail: javamail-1_4.zip dumped activation.jar into
> <ant-installationd-dir>/lib
> jaf: jaf-1_1-fr.zip         dumped mail.jar and lib directory into
> <ant-installation-dir>/lib
> jdk version:  1.5.0_12
> jre version:  1.5.0_12
>
> Error message generated when I run build script;
>
> mailarchive:
>      [mail] Using MIME mail
>      [mail] Sending email: latest binaries
>      [mail] From my_account@gmail.com
>      [mail] ReplyTo [my_account@gmail.com]
>      [mail] To [send_to_me_at_this_email_address@wideopenwest.com]
>      [mail] Cc []
>      [mail] Bcc []
>      [mail] Failed to send email: Exception reading response
>
> BUILD FAILED
> C:\project\build.xml:144: Problem while sending mime mail:
> 	at org.apache.tools.ant.taskdefs.email.MimeMailer.send 
> (MimeMailer.java:241)
> 	at
> org.apache.tools.ant.taskdefs.email.EmailTask.execute 
> (EmailTask.java:535)
> 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java: 
> 288)
> 	at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
> 	at
> sun.reflect.DelegatingMethodAccessorImpl.invoke 
> (DelegatingMethodAccessorImpl
> .java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at
> org.apache.tools.ant.dispatch.DispatchUtils.execute 
> (DispatchUtils.java:105)
> 	at org.apache.tools.ant.Task.perform(Task.java:348)
> 	at org.apache.tools.ant.Target.execute(Target.java:357)
> 	at org.apache.tools.ant.Target.performTasks(Target.java:385)
> 	at org.apache.tools.ant.Project.executeSortedTargets(Project.java: 
> 1329)
> 	at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
> 	at
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets 
> (DefaultExecutor.j
> ava:41)
> 	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
> 	at org.apache.tools.ant.Main.runBuild(Main.java:698)
> 	at org.apache.tools.ant.Main.startAnt(Main.java:199)
> 	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
> 	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
> Caused by: javax.mail.MessagingException: Exception reading response;
>   nested exception is:
> 	javax.net.ssl.SSLException: Unsupported record version Unknown-50.49
> 	at
> com.sun.mail.smtp.SMTPTransport.readServerResponse 
> (SMTPTransport.java:1462)
> 	at com.sun.mail.smtp.SMTPTransport.close(SMTPTransport.java:645)
> 	at javax.mail.Transport.send0(Transport.java:171)
> 	at javax.mail.Transport.send(Transport.java:98)
> 	at org.apache.tools.ant.taskdefs.email.MimeMailer.send 
> (MimeMailer.java:239)
> 	... 17 more
> 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
> )
> 	at
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord 
> (SSLSocketImpl.java
> :680)
> 	at com.sun.net.ssl.internal.ssl.AppInputStream.read 
> (AppInputStream.java:75)
> 	at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:97)
> 	at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
> 	at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
> 	at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java: 
> 75)
> 	at
> com.sun.mail.smtp.SMTPTransport.readServerResponse 
> (SMTPTransport.java:1440)
> 	... 21 more
> --- Nested Exception ---
> javax.mail.MessagingException: Exception reading response;
>   nested exception is:
> 	javax.net.ssl.SSLException: Unsupported record version Unknown-50.49
> 	at
> com.sun.mail.smtp.SMTPTransport.readServerResponse 
> (SMTPTransport.java:1462)
> 	at com.sun.mail.smtp.SMTPTransport.close(SMTPTransport.java:645)
> 	at javax.mail.Transport.send0(Transport.java:171)
> 	at javax.mail.Transport.send(Transport.java:98)
> 	at org.apache.tools.ant.taskdefs.email.MimeMailer.send 
> (MimeMailer.java:239)
> 	at
> org.apache.tools.ant.taskdefs.email.EmailTask.execute 
> (EmailTask.java:535)
> 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java: 
> 288)
> 	at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
> 	at
> sun.reflect.DelegatingMethodAccessorImpl.invoke 
> (DelegatingMethodAccessorImpl
> .java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at
> org.apache.tools.ant.dispatch.DispatchUtils.execute 
> (DispatchUtils.java:105)
> 	at org.apache.tools.ant.Task.perform(Task.java:348)
> 	at org.apache.tools.ant.Target.execute(Target.java:357)
> 	at org.apache.tools.ant.Target.performTasks(Target.java:385)
> 	at org.apache.tools.ant.Project.executeSortedTargets(Project.java: 
> 1329)
> 	at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
> 	at
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets 
> (DefaultExecutor.j
> ava:41)
> 	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
> 	at org.apache.tools.ant.Main.runBuild(Main.java:698)
> 	at org.apache.tools.ant.Main.startAnt(Main.java:199)
> 	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
> 	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
> 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
> )
> 	at
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord 
> (SSLSocketImpl.java
> :680)
> 	at com.sun.net.ssl.internal.ssl.AppInputStream.read 
> (AppInputStream.java:75)
> 	at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:97)
> 	at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
> 	at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
> 	at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java: 
> 75)
> 	at
> com.sun.mail.smtp.SMTPTransport.readServerResponse 
> (SMTPTransport.java:1440)
> 	... 21 more
>
> Total time: 3 seconds
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>

David Weintraub
david@weintraub.name
qazwart@gmail.com



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


Mime
View raw message