views:

455

answers:

3

I'm trying to set up Cruise Control to build my project and check for build failures. I've got most things working. I'd like emails sent to me on build success or failure.

However, I'm in a fairly restricted corporate environment, so I don't have an SMTP server with open ports available. We use exchange/outlook to send emails. How do I get Cruise Control to publish results using Exchange Server to send the emails?

A: 

No-one has answered, so here is what I've discovered so far. If the exchange server is configured to allow SMTP or authenticated SMTP then you can just treat it as an SMTP server. However, for me my server only allows NLTM authentication. JavaMail does not support this, so it is hard to get the <email> publisher to support it.

The only way seems to be a custom publisher. This will then allow a third party link between Java and exchange to be used. There are a list of such 3rd party libraries here: http://java.sun.com/products/javamail/Third_Party.html

J-Integra (commercial) and j-xchange(LGPL) look promising. The email publisher is open source and can be subclassed so this ought to make life easier. I currently plan to use this option.

Nick Fortescue
A: 

One option, if you run any *nix flavour) could be that you setup a mail relay (postfix?) on the machine where cruisecontrol is running that then will relay the mail to your real mail server with proper autentication.

rasjani
A: 

Hi Nick Fortescue,

currently i am facing a same issue what described in the above query. In one of the answer to the question(first one) you said we can write a custom publisher with some third party lib to solve it.. can u please provide more details on this solution.. i would appriciate if you send code for it.

thanks in advance...

hari
this shouldn't be an answer, it should probably be a comment on my answer. I'm afraid I'm unable to provide code due to my employers ownership restrictions.
Nick Fortescue