Is javamail a less secure application?

2020-04-08 13:31发布

I was just working on an email program that read emails from Gmail and does further processing. Initially using the code provide in SO(link provided below) I was getting an exception which says that "My access has been blocked and I need to login via web browser".

On the same time I saw an email in inbox (to which I am trying to connect) which says that "Google Account: sign-in attempt blocked" and I need to disable modern security from following link "https://www.google.com/settings/security/lesssecureapps".

I tried to disable and I was succesfully connected.

So does it means that Javamail is a less secure application? Or there are ways by which I can still connect without disabling the option?

Thanks in advance. Garry

[Code I used:]

1条回答
Melony?
2楼-- · 2020-04-08 14:00

It's really hard to tell because Google isn't saying exactly what "modern security standards" an app needs to implement to be "more secure", but I suspect they're referring to this blog entry where they talk about OAuth2. JavaMail is capable of using the OAuth2 authentication mechanism, which I guess makes JavaMail a "more secure" application.

查看更多
登录 后发表回答