Reason
Currently (0.4a)
SnipSnap does not support authenticated mail delivery for lost-password emails. The used mail server has changed now to only accept such authticated smtp mails and therefore code was updated.
Updated org.snipsnap.util.mail.Mail
I introduced two new config properties for the smtp authentication settings.
static class PopupAuthenticator extends Authenticator {
public PasswordAuthentication getPasswordAuthentication() {
AppConfiguration config = Application.get().getConfiguration();
return new PasswordAuthentication(
config.getProperty("app.mail.smtp.user"),
config.getProperty("app.mail.smtp.password"));
}
}[...]public Mail() {
Properties props = new Properties();
AppConfiguration config = Application.get().getConfiguration();
[...]
if (null != mailhost) {
props.put("mail.smtp.host", addr.getHostName());
props.put("mail.smtp.auth", "true");
Authenticator auth = new PopupAuthenticator();
session = Session.getDefaultInstance(props, auth);
// session.setDebug(true); // Verbose!
}
}