ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Priest, James \(NIH/NIEHS\) [C]" <Prie...@niehs.nih.gov>
Subject RE: Cannot send e-mail via ant
Date Thu, 26 Apr 2007 12:50:12 GMT
> -----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


Mime
View raw message