In virtually all applications that are developed for different purposes, there is always the need to send e-mails, whether for information, to reset user passwords, among others. This configuration is not complicated to perform in the WildFly Server. The configuration through the standalone.xml
file is performed in two steps. First, you must create a mail session inside the mail
subsystem; second, create an outbound socket binding within the socket binding group at the end of the standalone.xml
file. First, we create the mail session, to access this standalone.xml
configuration file and include the following configuration within the mail subsystem:
<mail-session name="ExampleGmail" jndi-name="java:jboss/mail/ExampleGmail"> <smtp-server ssl="true" outbound-socket-binding-ref="mail-gmail-smtp" username="[email protected]" password="secret"/> </mail-session>
This is as follows:
<subsystem xmlns="urn:jboss:domain:mail:2.0"> <mail-session name="default...