'Gmail will remove "Less secure apps" on the 30th of May. What does that mean for javax mail?
Google is removing the access to gmail for "Less secure apps" starting the 1st of April (Gmail notification).
That probably means that we won't be able to use javax mail with a gmail account anymore. Are there any workarounds to this? Are there other recommended email services that are just as good or better than gmail?
Solution 1:[1]
If you want to keep using imaplib then The easiest fix for the depiction of less secure apps is to switch to using an apps password.
Another option would be to swtich to using Xoauth2 javax mail appears to support that Oauth2
Properties props = new Properties();
props.put("mail.imap.ssl.enable", "true"); // required for Gmail
props.put("mail.imap.auth.mechanisms", "XOAUTH2");
Session session = Session.getInstance(props);
Store store = session.getStore("imap");
store.connect("imap.gmail.com", username, oauth2_access_token);
Solution 2:[2]
I've already signed up with gmx.com now.
I use Outlook Express 6.
Google has screwed up here.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | DaImTo |
| Solution 2 | Ariel Schnee |
