You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Denis Bessmertnyj <db...@isd.dp.ua> on 2007/04/26 12:34:48 UTC
Cannot send e-mail via ant
Hi, All.
I try to send e-mail via ant.
Here is my code
<mail mailhost="..."
mailport="..."
from="..."
tolist="..."
subject="..."
messagefile="..."
encoding="mime"
messagemimetype="text/html"
charset="Windows-1251">
<fileset dir="...">
<include name="**/*.xml"/>
</fileset>
</mail>
And I receive
BUILD FAILED
java.lang.NoSuchFieldError: headers
What is wrong?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Cannot send e-mail via ant
Posted by Denis Bessmertnyj <db...@isd.dp.ua>.
Thank you, James.
Now it is all ok with it. It was something with activation.jar & mail.jar
files and I updated them.
-
Denis
----- Original Message -----
From: "Priest, James (NIH/NIEHS) [C]" <Pr...@niehs.nih.gov>
To: "Ant Users List" <us...@ant.apache.org>
Sent: Thursday, April 26, 2007 3:50 PM
Subject: RE: Cannot send e-mail via ant
> -----Original Message-----
> From: Denis Bessmertnyj [mailto:dbes@isd.dp.ua]
> Sent: Thursday, April 26, 2007 6:35 AM
> To: Ant Users List
> Subject: Cannot send e-mail via ant
> And I receive
>
> BUILD FAILED
> java.lang.NoSuchFieldError: headers
Ì'd try it without the fileset just to see if you can get it to send
anything.
Here is the code I use:
<target name="sendMail" description="Send email notification">
<mail mailhost="smtp.mymailhost.com" mailport="25"
subject="'${project.name}' build at revision ${svn.versionnum} successful"
messagefile="${build.logfile}">
<from address="${email.toaddress}"/>
<to address="${email.fromaddress}"/>
</mail>
<echo message="Mail sent!"/>
</target>
This sends me my build log file as the content of the email.
I run this from within Eclipse and I get an email error but it gets sent
anyway:
sendMail:
[mail] Failed to initialise MIME mail: javax/mail/MessagingException
[mail] Sending email: 'mrc' build at revision 228 successful
[mail] Sent email with 0 attachments
[echo] Mail sent!
Jim
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
RE: Cannot send e-mail via ant
Posted by "Priest, James (NIH/NIEHS) [C]" <Pr...@niehs.nih.gov>.
> -----Original Message-----
> From: Denis Bessmertnyj [mailto:dbes@isd.dp.ua]
> Sent: Thursday, April 26, 2007 6:35 AM
> To: Ant Users List
> Subject: Cannot send e-mail via ant
> And I receive
>
> BUILD FAILED
> java.lang.NoSuchFieldError: headers
Ì'd try it without the fileset just to see if you can get it to send anything.
Here is the code I use:
<target name="sendMail" description="Send email notification">
<mail mailhost="smtp.mymailhost.com" mailport="25"
subject="'${project.name}' build at revision ${svn.versionnum} successful"
messagefile="${build.logfile}">
<from address="${email.toaddress}"/>
<to address="${email.fromaddress}"/>
</mail>
<echo message="Mail sent!"/>
</target>
This sends me my build log file as the content of the email.
I run this from within Eclipse and I get an email error but it gets sent anyway:
sendMail:
[mail] Failed to initialise MIME mail: javax/mail/MessagingException
[mail] Sending email: 'mrc' build at revision 228 successful
[mail] Sent email with 0 attachments
[echo] Mail sent!
Jim
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org