Hmmmmmmm... The problem is something related to the verson of Java used, Java 1.4 vs Java 5.
When I use Java 1.4, MailLogger & the <mail> task both work OK. I can have an email sent by the MailLogger that the build was successful, and have a mail sent via the <mail> task, all within the same single execution of the build. When I use Java 5, whatever scenario sends the first email (MailLogger or the <mail> task), is the only method of sending email henceforth FOREVER. -----Original Message----- From: Anderson, Rob (Global Trade) [mailto:[EMAIL PROTECTED] Sent: Friday, May 19, 2006 1:51 PM To: Ant Users List Subject: RE: MailLogger=OK, task <mail>=SMTPSendFailedException? Strange indeed. I just ran a simple test with the mail task and properties below, of course changing the props for my environment. It seems to work, and I don't see anything wrong with your usage. The error "message refused" may be coming from the mail server. Can you access the logs for the mail server? If not, ask the mail admins to lookup any entries in the logs at the specific time of the failure from the host you are running the ant task. Also might be usefull to lookup log entries from a successful run via Eclipse, for comparison. -Rob A > -----Original Message----- > From: Jeff A. Drost [mailto:[EMAIL PROTECTED] > Sent: Friday, May 19, 2006 10:22 AM > To: Ant Users List > Subject: RE: MailLogger=OK, task <mail>=SMTPSendFailedException? > > No it can't run the <mail> task if I run the build from ant > on the command line without the MailLogger. > > Yes it can run the <mail> task if I run the build using Ant > within Eclipse without the MailLogger. > > I have tried replacing all my ant/lib jars with what Eclipse > uses for its ant/lib jars to get the <mail> task to work via > the command line, thinking maybe there was a special Ant > library Eclipse had that the normal Ant installation did not, > but that did make the <mail> task function either. > > -----Original Message----- > From: Anderson, Rob (Global Trade) [mailto:[EMAIL PROTECTED] > Sent: Thursday, May 18, 2006 5:33 PM > To: Ant Users List > Subject: RE: MailLogger=OK, task <mail>=SMTPSendFailedException? > > Can you run this mail task when you are not using the MailLogger? > > -Rob A > > > -----Original Message----- > > From: Jeff A. Drost [mailto:[EMAIL PROTECTED] > > Sent: Thursday, May 18, 2006 1:52 PM > > To: user@ant.apache.org > > Subject: MailLogger=OK, task <mail>=SMTPSendFailedException? > > > > I cannot figure out why ant's MailLogger will send an > email, but the > > <mail> task will not, when they both share similar SMTP > properties in > > my build & properties file. > > > > Ant 1.6.5 > > Windows XP SP2 > > Java 5 Update 6 > > > > The ant logger argument "-logger > > org.apache.tools.ant.listener.MailLogger" sends an email > when my build > > fails. When I use the <mail> task in the same build script, a > > SMTPSendFailedException is thrown: > > > > com.sun.mail.smtp.SMTPSendFailedException: 550 5.7.1 > Requested action > > not taken: message refused > > > > Both the mail logger and the <mail> task share the same mail host. > > The only difference I can discern is the mime types. The > 2nd email, > > sent via the <mail> task, is of mime type "text/html". If > I specify > > no message mime type, I receive the same SMTPSendFailedException as > > above. > > > > From the properties file: > > MailLogger.mailhost=something.com > > [EMAIL PROTECTED] > > MailLogger.port=25 > > MailLogger.failure.notify=true > > MailLogger.success.notify=false > > [EMAIL PROTECTED] > > [EMAIL PROTECTED] > > MailLogger.failure.subject=Java Compile Failure > > MailLogger.success.subject=Ant Success > > [EMAIL PROTECTED] > > test.mail.subject=Unit Test Failure > > > > From the ant build file: > > <mail mailhost="${MailLogger.mailhost}" > mailport="${MailLogger.port}" > > subject="${test.mail.subject}" tolist="${test.mail.list}" > > messagemimetype="text/html" > > messagefile="${test.report.dir}/junit-noframes.html" > > from="${MailLogger.from}" replyto="${MailLogger.from}" > > /> > > > > Advise? > > > > > > __________________________________________________________ > > The information transmitted may contain confidential > material and is > > intended only for the person or entity to which it is > addressed. Any > > review, retransmission, dissemination or other use of, or taking of > > any action by persons or entities other than the intended > recipient is > > prohibited. If you are not the intended recipient, please > delete the > > information from your system and contact the sender. > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]