I am trying to develop a Gmail clone, I have integrated the email sending process and all. I just want to integrate an email authentication system.
Session session = Session.getInstance(props,
new javax.mail.Authenticator() {
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username1, password);
}
});
I want to send this session to Gmail to authenticate the email. But I couldn't find a way to do so.