javax.mail.AuthenticationFailedException: 535-5.7.8 Username and Password not accepted
问题 Mail service configuration in standalone-full-ha.xml . <subsystem xmlns="urn:jboss:domain:mail:2.0"> <mail-session name="default" jndi-name="java:jboss/mail/Default" from="sender@gmail.com"> <smtp-server outbound-socket-binding-ref="mail-smtp" ssl="true" username="User" password="password"/> </mail-session> </subsystem> The mail Session in turn references an SMTP host bound at localhost at port 465. <outbound-socket-binding name="mail-smtp"> <remote-destination host="smtp.gmail.com" port="465