You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Knuplesch, Jürgen <Ju...@icongmbh.de> on 2008/01/11 14:03:21 UTC

Mail Task

When I run the mail task I often get this Errormessage:

mailtest:
     [mail] Failed to initialise MIME mail: javax/mail/MessagingException
     [mail] Sending email: Mailtest
     [mail] Failed to send email

BUILD FAILED
C:\DopeBuildBase\Build\DopeBuildServer\dopebuild_ant.xml:2973: IO error sending mail

But when I run the Ant-File with Eclipse it works and when I send Mails in my Buildprocess it works from one server but not from the other. It never worked from the commandline.

Where do I have to search?
Is there a reason or a solution?
Is there a special jar that is sometimes missing?

This is my Testmailfile that works under Eclipse, but not as Batch on a different machine:

<project name="Testmail" default="mailtest">


	<property name="MailLogger.mailhost" value="XXXXXXX"/>
	<property name="MailLogger.from"     value="Mailtest"/>
	<property name="MailLogger.failure.subject" value="Mailbuild"/>
	<property name="MailLogger.success.subject" value="Mailbuild success"/>
	<property name="MailLogger.failure.to" value="Juergen.Knuplesch@icongmbh.de"/>
	<property name="MailLogger.success.to" value="Juergen.Knuplesch@icongmbh.de"/>

  
	<target name="mailtest" description="Hallo">  
	
	  <mail  mailhost="XXXXXXX" 
	         subject="Mailtest"
	         tolist="Juergen.Knuplesch@icongmbh.de"
	    		 message="Alles klar"
	    		 from="Juergen.Knuplesch@icongmbh.de">
	  </mail>
	</target>
  
</project>


-- 
Jürgen Knuplesch                    www.icongmbh.de
icon Systemhaus GmbH                Tel. +49 711 806098-275
Sophienstraße 40                    
D-70178 Stuttgart                   Fax. +49 711 806098-299

Geschäftsführer: Uwe Seltmann
HRB Stuttgart 17655
USt-IdNr.: DE 811944121 

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


AW: Mail Task

Posted by Knuplesch, Jürgen <Ju...@icongmbh.de>.
Thanks to Kevin and malleswararaosn,

That helped a lot. The rest are questions of the configuration of our mailserver.

Greetings

Jürgen 


-- 
Jürgen Knuplesch                    www.icongmbh.de
icon Systemhaus GmbH                Tel. +49 711 806098-275
Sophienstraße 40                    
D-70178 Stuttgart                   Fax. +49 711 806098-299

Geschäftsführer: Uwe Seltmann
HRB Stuttgart 17655
USt-IdNr.: DE 811944121 
-----Ursprüngliche Nachricht-----
Von: raos [mailto:malleswararaosn@yahoo.co.in] 
Gesendet: Freitag, 11. Januar 2008 15:50
An: user@ant.apache.org
Betreff: Re: Mail Task


Please check for activate.jar, mail.jar files in your ANT_HOME/lib directory.



Knuplesch, Jürgen wrote:
> 
> When I run the mail task I often get this Errormessage:
> 
> mailtest:
>      [mail] Failed to initialise MIME mail: javax/mail/MessagingException
>      [mail] Sending email: Mailtest
>      [mail] Failed to send email
> 
> BUILD FAILED
> C:\DopeBuildBase\Build\DopeBuildServer\dopebuild_ant.xml:2973: IO 
> error sending mail
> 
> But when I run the Ant-File with Eclipse it works and when I send 
> Mails in my Buildprocess it works from one server but not from the 
> other. It never worked from the commandline.
> 
> Where do I have to search?
> Is there a reason or a solution?
> Is there a special jar that is sometimes missing?
> 
> This is my Testmailfile that works under Eclipse, but not as Batch on 
> a different machine:
> 
> <project name="Testmail" default="mailtest">
> 
> 
> 	<property name="MailLogger.mailhost" value="XXXXXXX"/>
> 	<property name="MailLogger.from"     value="Mailtest"/>
> 	<property name="MailLogger.failure.subject" value="Mailbuild"/>
> 	<property name="MailLogger.success.subject" value="Mailbuild success"/>
> 	<property name="MailLogger.failure.to"
> value="Juergen.Knuplesch@icongmbh.de"/>
> 	<property name="MailLogger.success.to"
> value="Juergen.Knuplesch@icongmbh.de"/>
> 
>   
> 	<target name="mailtest" description="Hallo">
> 	
> 	  <mail  mailhost="XXXXXXX" 
> 	         subject="Mailtest"
> 	         tolist="Juergen.Knuplesch@icongmbh.de"
> 	    		 message="Alles klar"
> 	    		 from="Juergen.Knuplesch@icongmbh.de">
> 	  </mail>
> 	</target>
>   
> </project>
> 
> 
> -- 
> Jürgen Knuplesch                    www.icongmbh.de
> icon Systemhaus GmbH                Tel. +49 711 806098-275
> Sophienstraße 40                    
> D-70178 Stuttgart                   Fax. +49 711 806098-299
> 
> Geschäftsführer: Uwe Seltmann
> HRB Stuttgart 17655
> USt-IdNr.: DE 811944121
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional 
> commands, e-mail: user-help@ant.apache.org
> 
> 
> 

--
View this message in context: http://www.nabble.com/Mail-Task-tp14755932p14757369.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
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: Mail Task

Posted by raos <ma...@yahoo.co.in>.
Please check for activate.jar, mail.jar files in your ANT_HOME/lib directory.



Knuplesch, Jürgen wrote:
> 
> When I run the mail task I often get this Errormessage:
> 
> mailtest:
>      [mail] Failed to initialise MIME mail: javax/mail/MessagingException
>      [mail] Sending email: Mailtest
>      [mail] Failed to send email
> 
> BUILD FAILED
> C:\DopeBuildBase\Build\DopeBuildServer\dopebuild_ant.xml:2973: IO error
> sending mail
> 
> But when I run the Ant-File with Eclipse it works and when I send Mails in
> my Buildprocess it works from one server but not from the other. It never
> worked from the commandline.
> 
> Where do I have to search?
> Is there a reason or a solution?
> Is there a special jar that is sometimes missing?
> 
> This is my Testmailfile that works under Eclipse, but not as Batch on a
> different machine:
> 
> <project name="Testmail" default="mailtest">
> 
> 
> 	<property name="MailLogger.mailhost" value="XXXXXXX"/>
> 	<property name="MailLogger.from"     value="Mailtest"/>
> 	<property name="MailLogger.failure.subject" value="Mailbuild"/>
> 	<property name="MailLogger.success.subject" value="Mailbuild success"/>
> 	<property name="MailLogger.failure.to"
> value="Juergen.Knuplesch@icongmbh.de"/>
> 	<property name="MailLogger.success.to"
> value="Juergen.Knuplesch@icongmbh.de"/>
> 
>   
> 	<target name="mailtest" description="Hallo">  
> 	
> 	  <mail  mailhost="XXXXXXX" 
> 	         subject="Mailtest"
> 	         tolist="Juergen.Knuplesch@icongmbh.de"
> 	    		 message="Alles klar"
> 	    		 from="Juergen.Knuplesch@icongmbh.de">
> 	  </mail>
> 	</target>
>   
> </project>
> 
> 
> -- 
> Jürgen Knuplesch                    www.icongmbh.de
> icon Systemhaus GmbH                Tel. +49 711 806098-275
> Sophienstraße 40                    
> D-70178 Stuttgart                   Fax. +49 711 806098-299
> 
> Geschäftsführer: Uwe Seltmann
> HRB Stuttgart 17655
> USt-IdNr.: DE 811944121 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Mail-Task-tp14755932p14757369.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


RE: Mail Task

Posted by "Toomey, Kevin H (ATS, IT)" <Ke...@thehartford.com>.
Juergen

Your problem appears similar to something I ran across a while back. After doing some digging I did find the cause but the details are escaping me for the moment. I believe you're correct that it's a missing jar file. In any event, since the messages I was sending were plain text, adding encoding="plain" to my <mail> task cleared up the issue.

Hope that helps.

Thanks,
Kevin

-----Original Message-----
From: Knuplesch, Jürgen [mailto:Juergen.Knuplesch@icongmbh.de]
Sent: Friday, January 11, 2008 8:03 AM
To: user@ant.apache.org
Subject: Mail Task


When I run the mail task I often get this Errormessage:

mailtest:
     [mail] Failed to initialise MIME mail: javax/mail/MessagingException
     [mail] Sending email: Mailtest
     [mail] Failed to send email

BUILD FAILED
C:\DopeBuildBase\Build\DopeBuildServer\dopebuild_ant.xml:2973: IO error sending mail

But when I run the Ant-File with Eclipse it works and when I send Mails in my Buildprocess it works from one server but not from the other. It never worked from the commandline.

Where do I have to search?
Is there a reason or a solution?
Is there a special jar that is sometimes missing?

This is my Testmailfile that works under Eclipse, but not as Batch on a different machine:

<project name="Testmail" default="mailtest">


	<property name="MailLogger.mailhost" value="XXXXXXX"/>
	<property name="MailLogger.from"     value="Mailtest"/>
	<property name="MailLogger.failure.subject" value="Mailbuild"/>
	<property name="MailLogger.success.subject" value="Mailbuild success"/>
	<property name="MailLogger.failure.to" value="Juergen.Knuplesch@icongmbh.de"/>
	<property name="MailLogger.success.to" value="Juergen.Knuplesch@icongmbh.de"/>

  
	<target name="mailtest" description="Hallo">  
	
	  <mail  mailhost="XXXXXXX" 
	         subject="Mailtest"
	         tolist="Juergen.Knuplesch@icongmbh.de"
	    		 message="Alles klar"
	    		 from="Juergen.Knuplesch@icongmbh.de">
	  </mail>
	</target>
  
</project>


-- 
Jürgen Knuplesch                    www.icongmbh.de
icon Systemhaus GmbH                Tel. +49 711 806098-275
Sophienstraße 40                    
D-70178 Stuttgart                   Fax. +49 711 806098-299

Geschäftsführer: Uwe Seltmann
HRB Stuttgart 17655
USt-IdNr.: DE 811944121 

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



*************************************************************************
This communication, including attachments, is
for the exclusive use of addressee and may contain proprietary,
confidential and/or privileged information.  If you are not the intended
recipient, any use, copying, disclosure, dissemination or distribution is
strictly prohibited.  If you are not the intended recipient, please notify
the sender immediately by return e-mail, delete this communication and
destroy all copies.
*************************************************************************


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