azkaban/azkaban — pull request #311 by ReccaHokage (2014-09-03 09:17:58+00:00)
Title: Add option to send mails without authentication

The default behaviour of Azkaban is to send emails with mail.smtp.auth set to true. However, our internal SMTP server supports sending of emails without authentication for certain accounts, using the default Azkaban behaviour would throw the following error.

```
[Emailer] [Azkaban] Email message send failed
javax.mail.AuthenticationFailedException: No authentication mechansims supported by both server and client
at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:760)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:673)
at javax.mail.Service.connect(Service.java:295)
at javax.mail.Service.connect(Service.java:176)
at azkaban.utils.EmailMessage.sendEmail(EmailMessage.java:197)
at azkaban.utils.Emailer.sendErrorEmail(Emailer.java:153)
at azkaban.utils.Emailer.alertOnError(Emailer.java:203)
at azkaban.executor.ExecutorManager.finalizeFlows(ExecutorManager.java:986)
at azkaban.executor.ExecutorManager.access$1100(ExecutorManager.java:60)
at azkaban.executor.ExecutorManager$ExecutingManagerUpdaterThread.run(ExecutorManager.java:910)
```

This commit allows emails to be sent without any authentication. Adds an optional boolean parameter mail.useAuth (defaults to true) in azkaban.properties.