ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy Lambert <anto...@gmx.de>
Subject Re: Issue sending mail with ANT 1.8 when encoding set to "Plain"
Date Wed, 17 Mar 2010 22:32:16 GMT
Hi,

I confirm the bug. It will be fixed in ant 1.8.1 and I will enter the 
bug report myself.

Regards,

Antoine

Antoine Levy Lambert wrote:
> Hello Rao,
>
> I confirm the problem with the following snippet
>
> <project name="sendmail">
> <mail from="me" mailhost="450-mail-relay"
>      tolist="you@foo.com" encoding="plain"
>      subject="Results of nightly build">
>          </mail>
>
> </project>
>
> Would you mind entering a bug report in bugzilla ?
>
> Regards,
>
> Antoine
>
>
> Rao Chaudhri wrote:
>> Hi,
>>  
>>
>> I am using ANT build files to do build and deploy for J2EE 
>> applications. We recently upgraded ANT from 1.5 to 1.8.
>> ANT 1.8 complains while sending e-mail when encoding is set to 
>> "Plain", however, it works fine if encoding is set to "MIME" or "AUTO".
>> I want to use encoding "Plain" because this way my log file appears 
>> in the email body, as oppose to MIME or AUTO which attaches the
>> file with the body of the email.
>>
>>  
>>
>> Here's my error stack trace when sending e-mail using encoding 
>> "Plain" with ANT 1.8:
>>
>>  
>>
>>      [mail] Failed to send email: Socket closed
>>
>>  
>>
>> BUILD FAILED
>>
>>  
>>
>> /1fb/home/build/jdev/scripts/scripts/deploy10gr3/deploybw.xml:415: IO 
>> error sending mail
>>
>>             at 
>> org.apache.tools.ant.taskdefs.email.PlainMailer.send(PlainMailer.java:113) 
>>
>>
>>             at 
>> org.apache.tools.ant.taskdefs.email.EmailTask.execute(EmailTask.java:571) 
>>
>>
>>             at 
>> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
>>
>>             at sun.reflect.GeneratedMethodAccessor4.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:106) 
>>
>>
>>             at org.apache.tools.ant.Task.perform(Task.java:348)
>>
>>             at org.apache.tools.ant.Target.execute(Target.java:390)
>>
>>             at org.apache.tools.ant.Target.performTasks(Target.java:411)
>>
>>             at 
>> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1360)
>>
>>             at 
>> org.apache.tools.ant.Project.executeTarget(Project.java:1329)
>>
>>             at 
>> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)

>>
>>
>>             at 
>> org.apache.tools.ant.Project.executeTargets(Project.java:1212)
>>
>>             at org.apache.tools.ant.Main.runBuild(Main.java:801)
>>
>>             at org.apache.tools.ant.Main.startAnt(Main.java:218)
>>
>>             at org.apache.tools.ant.Main.start(Main.java:180)
>>
>>             at org.apache.tools.ant.Main.main(Main.java:269)
>>
>> Caused by: java.net.SocketException: Socket closed
>>
>>             at java.net.SocketInputStream.socketRead0(Native Method)
>>
>>             at 
>> java.net.SocketInputStream.read(SocketInputStream.java:129)
>>
>>             at 
>> sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:411)
>>
>>             at 
>> sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:453)
>>
>>             at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:183)
>>
>>             at 
>> java.io.InputStreamReader.read(InputStreamReader.java:167)
>>
>>             at java.io.BufferedReader.fill(BufferedReader.java:136)
>>
>>             at java.io.BufferedReader.readLine(BufferedReader.java:299)
>>
>>             at java.io.BufferedReader.readLine(BufferedReader.java:362)
>>
>>             at 
>> org.apache.tools.mail.SmtpResponseReader.getResponse(SmtpResponseReader.java:58)

>>
>>
>>             at 
>> org.apache.tools.mail.MailMessage.send(MailMessage.java:443)
>>
>>             at 
>> org.apache.tools.mail.MailMessage.sendDot(MailMessage.java:429)
>>
>>             at 
>> org.apache.tools.mail.MailMessage.sendAndClose(MailMessage.java:348)
>>
>>             at 
>> org.apache.tools.ant.taskdefs.email.PlainMailer.send(PlainMailer.java:111) 
>>
>>
>>             ... 17 more
>>
>>  
>>
>>  
>>
>>  
>>
>> ANT Libraries I am loading in my CLASSPATH:
>>
>>  
>>
>> ant.jar
>>
>> ant-launcher.jar
>>
>> ant-javamail.jar
>>
>> xercesImpl.jar
>>
>> activation.jar
>>
>> mail.jar
>>
>> xml-apis.jar
>>
>>  
>>
>>  
>>
>>  
>>
>> Thanks
>>
>> Rao U. Chaudhri
>>
>> 415-591-3031
>>
>>
>>   
>
>


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


Mime
View raw message