How to make NAnt send an email using a real account
- by Turro
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...