You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Pico Geyer <pi...@softstart.co.za> on 2004/11/09 17:47:44 UTC

Ant MailLogger throws Exception

Hi all

 

I am trying to setup an automated build process on my linux box.

All is well except for the MailLogger.

The following output notes the problem:

 

MailLogger failed to send e-mail!

java.net.UnknownHostException: HBDServ: HBDServ

        at java.net.InetAddress.getLocalHost(InetAddress.java:1191)

        at
org.apache.tools.mail.MailMessage.sendHelo(MailMessage.java:408)

        at
org.apache.tools.mail.MailMessage.<init>(MailMessage.java:175)

        at
org.apache.tools.ant.listener.MailLogger.sendMail(MailLogger.java:200)

        at
org.apache.tools.ant.listener.MailLogger.buildFinished(MailLogger.java:1
34)

        at
org.apache.tools.ant.Project.fireBuildFinished(Project.java:1796)

        at org.apache.tools.ant.Main.runBuild(Main.java:693)

        at org.apache.tools.ant.Main.startAnt(Main.java:188)

        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)

        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)

 

Has anyone encountered this problem, or have a solution. HBDServ is the
name of my box.

 

I have the following properties defined at the beginning of my build
script

<property name="MailLogger.from" value="username@localhost"/>

<property name="MailLogger.failure.to" value="user@domainName"/>

<property name="MailLogger.succcess.to" value="user@domainName"/>

 

Thanks

 

 


Re: Ant MailLogger throws Exception

Posted by Antoine Levy-Lambert <an...@gmx.de>.
Hello Pico,

add <property name="MailLogger.mailhost" value="fully qualified name of 
your SMTP gateway"/>

to your ant build file.

The documentation says that the mailhost defaults to localhost.

Cheers,

Antoine
Pico Geyer wrote:

>Hi all
>
> 
>
>I am trying to setup an automated build process on my linux box.
>
>All is well except for the MailLogger.
>
>The following output notes the problem:
>
> 
>
>MailLogger failed to send e-mail!
>
>java.net.UnknownHostException: HBDServ: HBDServ
>
>        at java.net.InetAddress.getLocalHost(InetAddress.java:1191)
>
>        at
>org.apache.tools.mail.MailMessage.sendHelo(MailMessage.java:408)
>
>        at
>org.apache.tools.mail.MailMessage.<init>(MailMessage.java:175)
>
>        at
>org.apache.tools.ant.listener.MailLogger.sendMail(MailLogger.java:200)
>
>        at
>org.apache.tools.ant.listener.MailLogger.buildFinished(MailLogger.java:1
>34)
>
>  
>
....

> 
>
>Has anyone encountered this problem, or have a solution. HBDServ is the
>name of my box.
>
> 
>
>I have the following properties defined at the beginning of my build
>script
>
><property name="MailLogger.from" value="username@localhost"/>
>
><property name="MailLogger.failure.to" value="user@domainName"/>
>
><property name="MailLogger.succcess.to" value="user@domainName"/>
>
> 
>
>Thanks
>
> 
>
> 
>
>
>  
>



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