I'd like to convert this block of code from Java to Kotlin:
Session session = Session.getInstance(props,
new javax.mail.Authenticator() {
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication("username", "password");
}
})
But I'm unable to appropiately convert this part:
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication("username", "password")
}
How could that conversion be made?