How to make NAnt send an email using a real account

Posted by Turro on Stack Overflow See other posts from Stack Overflow or by Turro
Published on 2009-07-03T13:10:41Z Indexed on 2010/04/19 14:33 UTC
Read the original article Hit count: 459

Filed under:
|

First of all, I have already seen this post: nant mail issues but the only answer is not satisfactory (i.e.: doesn't work for me).

I am using NAnt to get latest version of source, upgrade version of the libraries and application, build the application, build the setups... all the usual things, I bet. I would like NAnt to send an email to some people confirming the conclusion of the build process; I've already checked the official (pretty ugly, IMHO) documentation for the task, but the example, once copied and customized, doesn't work.

This are the NAnt target and task I'm using:

<target name="sendMail" >
    <mail 
        from="[email protected]" 
        tolist="[email protected];[email protected]" 
        subject="Subject of email" 
        mailhost="smtp.gmail.com"
        message="Your new release is ready!">
    </mail>
</target>

The error message I get is:

530 5.7.0 Must issue a STARTTLS command first.

It looks like that the task was designed for use by an account whose provider doesn't need authentication; but what can I do if I must use an external smtp server which requires authentication (telling my boss I need an smtp server in house is not an option)?

Can anybody help/teach me?

Thanks in advance...

© Stack Overflow or respective owner

Related posts about nant-task

Related posts about nant