Skip to content

Instantly share code, notes, and snippets.

@d6y
Created July 8, 2012 18:24
Show Gist options
  • Select an option

  • Save d6y/3072181 to your computer and use it in GitHub Desktop.

Select an option

Save d6y/3072181 to your computer and use it in GitHub Desktop.
Boot settings
import javax.mail._
def optionalAuth: Box[Authenticator] = for {
user <- Props.get("mail.user")
pass <- Props.get("mail.password")
} yield new Authenticator {
override def getPasswordAuthentication = new PasswordAuthentication(user,pass)
}
Mailer.authenticator = optionalAuth
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment