공부
[java] send email auth
승가비
2022. 9. 11. 20:13
728x90
val msg = MimeMessage(
Session.getDefaultInstance(
props,
object : Authenticator() {
override fun getPasswordAuthentication(): PasswordAuthentication {
return PasswordAuthentication(ID, PW)
}
}
)
)
javax.mail.AuthenticationFailedException: failed to connect, no password specified?
This program attempts to send e-mail but throws a run time exception: javax.mail.AuthenticationFailedException: failed to connect, no password specified? Why am I getting this exception when I have
stackoverflow.com
Transport.send(msg, "user", "password");
728x90