Open benjaminxie opened 2 years ago
Maybe the password is wrong. I think in Gmail for example you cannot use the user-password you use to login in your emails. You need to use other password. Maybe this is the same case.
You can try to login with telnet to discard whether this is a jakarta.mail/angus issue:
$ telnet host port
USER myusername
+OK User name accepted, password please
PASS mysecretpassword
+OK Mailbox open, 3 messages
If the password is wrong, you should also receive an error there.
Also you can add the next property to obtain more information:
properties.setProperty("mail.debug", "true")
Edit: I just realized that I'm using angus-mail:1.0.0 . I'm sorry if this is the wrong place to be posting my issue.
I'm trying to access my Office365 Outlook mailbox. I've attempted to authenticate via two-legged OAuth as well as just basic auth. Nonetheless, I hit similar errors. In the case of OAuth
and in the case of basic auth
I'm guessing there's something simple that I'm doing incorrectly but I haven't been able to find any relevant code examples. My code is pasted below
I think I have everything properly setup on the Azure Active Directory and mailbox settings side but any suggestions are welcome.