最后有贴代码。
主要是为了记录问题:Please log in via your web browser and then try again
javax.mail.AuthenticationFailedException: 534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbvO
534-5.7.14 o9jW8RRzSdzbRqYjP_N-zT5jDgtO5pB1uSeynVxOR2Ce2_tByqDdLI-SzA10rYh3Uuczkb
534-5.7.14 2k8jIaCXgElD9jZVuEdyUIDA0Hv7E7vk9K9PinhaDqvjhv6m-SCaMTLE6736d7jTC5xhTb
534-5.7.14 7gwQBT-5C0wh2xIwXQnvFtjpaj_5qbcesr_jNpGAuDAQcR3Uwn8aasXsbeRsby5SKXa655
534-5.7.14 rkO_KwxTJR9Jk2syvu3naDQ1lTJEU> Please log in via your web browser and
534-5.7.14 then try again.
534-5.7.14 Learn more at
534 5.7.14 https://support.google.com/mail/answer/78754 s125-v6sm15148194iod.18 - gsmtp
原因:gmail没有对设备授权
分两步:
1.打开开关:允许不够安全的应用