I tried specifiying the mail host and it didn't help :(
It works with text/plain but not text/html... I have no clue what the html
part changes but it's enough so that the socket gets closed...
Here is the result with -debug
mail-junit:
Setting project property: DSTAMP -> 20011002
Setting project property: TSTAMP -> 0626
Setting project property: TODAY -> October 2 2001
[mimemail] message sender: [EMAIL PROTECTED]
[mimemail] subject: JUnit Test Results: October 2 2001
[mimemail] sending email
BUILD FAILED
/home/plavoie/project/vbc/build.xml:664: javax.mail.MessagingException:
Can't send command to SMTP host;
nested exception is:
java.net.SocketException: Socket closed
at
org.apache.tools.ant.taskdefs.optional.net.MimeMail.execute(MimeMail.java:30
8)
at org.apache.tools.ant.Task.perform(Task.java:217)
at org.apache.tools.ant.Target.execute(Target.java:164)
at org.apache.tools.ant.Target.performTasks(Target.java:182)
at org.apache.tools.ant.Project.executeTarget(Project.java:601)
at org.apache.tools.ant.Project.executeTargets(Project.java:560)
at org.apache.tools.ant.Main.runBuild(Main.java:454)
at org.apache.tools.ant.Main.start(Main.java:153)
at org.apache.tools.ant.Main.main(Main.java:176)
--- Nested Exception ---
javax.mail.MessagingException: Can't send command to SMTP host;
nested exception is:
java.net.SocketException: Socket closed
at
com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:518)
at com.sun.mail.smtp.SMTPTransport.close(SMTPTransport.java:204)
at javax.mail.Transport.send0(Transport.java:183)
at javax.mail.Transport.send(Transport.java:73)
at
org.apache.tools.ant.taskdefs.optional.net.MimeMail.doMail(MimeMail.java:429
)
at
org.apache.tools.ant.taskdefs.optional.net.MimeMail.execute(MimeMail.java:30
4)
at org.apache.tools.ant.Task.perform(Task.java:217)
at org.apache.tools.ant.Target.execute(Target.java:164)
at org.apache.tools.ant.Target.performTasks(Target.java:182)
at org.apache.tools.ant.Project.executeTarget(Project.java:601)
at org.apache.tools.ant.Project.executeTargets(Project.java:560)
at org.apache.tools.ant.Main.runBuild(Main.java:454)
at org.apache.tools.ant.Main.start(Main.java:153)
at org.apache.tools.ant.Main.main(Main.java:176)
Philippe Lavoie (819) 778-0345 cell: (819)
664-9881
Software Engineer
[EMAIL PROTECTED]
Cactus Communication Internet
> -----Original Message-----
> From: Erik Hatcher [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 02, 2001 11:07 AM
> To: [EMAIL PROTECTED]
> Subject: Re: JAVAMAIL problem
>
>
> Do you have a mail server running on localhost? The error
> message seems to
> indicate you don't, but since it worked in one of your
> examples and not the
> other this does not seem like the cause. But if localhost
> is not a mail
> server, you need to specify one using the mailhost attribute
> of <mimemail>.
>
> Do you get more exception details using ant -debug? Those
> would likely be
> useful for tracking down the cause of the problem.
>
> Erik
>
>
> ----- Original Message -----
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, October 02, 2001 7:45 AM
> Subject: RE: JAVAMAIL problem
>
>
> > I have the same problem
> >
> > Result is
> >
> > BUILD FAILED
> >
> > /home/plavoie/project/vbc/build.xml:662:
> javax.mail.MessagingException:
> > Can't send command to SMTP host;
> > nested exception is:
> > java.net.SocketException: Socket closed
> >
> >
> >
> > Relevant part of the build.xml is
> >
> > <!--
> > <mimemail messageMimeType="text/plain"
> > message="Junit test run results for ${TODAY}."
> > tolist="[EMAIL PROTECTED]"
> > subject="JUnit Test Results: ${TODAY}"
> > from="[EMAIL PROTECTED]">
> > <fileset dir="${reports.dir}/html">
> > <include name="*.html"/>
> > </fileset>
> > </mimemail>
> > -->
> >
> > <mimemail messageMimeType="text/html"
> >
> messageFile="${reports.dir}/html/junit-noframes.html"
> > tolist="[EMAIL PROTECTED]"
> > subject="JUnit Test Results: ${TODAY}"
> > from="[EMAIL PROTECTED]">
> > </mimemail>
> >
> > The commented part works fine, however the other generates the error
> above.
> >
> > I wanted to view the HTML page directly inside the mail
> browser instead of
> > having to see the attachement. Really odd error, socket closed ???
> >
> > Perhaps Detlef has another error though.
> >
> > Phil
> >
> >
> > Philippe Lavoie (819) 778-0345
> cell: (819)
> > 664-9881
> > Software Engineer
> > [EMAIL PROTECTED]
> > Cactus Communication Internet
> >
> >
> > > -----Original Message-----
> > > From: Erik Hatcher [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, October 02, 2001 8:54 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: JAVAMAIL problem
> > >
> > >
> > > Could you give us an idea of what happens when you try
> > > <mimemail>? What
> > > error message are you receiving?
> > >
> > >
> > > ----- Original Message -----
> > > From: <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Tuesday, October 02, 2001 2:01 AM
> > > Subject: JAVAMAIL problem
> > >
> > >
> > > > has anybody used mimemail with ant1.4 ?
> > > >
> > > > If I download javamail and all other packages I cannot add a
> > > application/zip
> > > > mimemail to it.
> > > >
> > > > how can I do this,
> > > >
> > > > detlef
> > > >
> > >
> >
>