Configuration of the mail server
The configuration is in the standalone.xml
file. By default, the mail server points to localhost
. Here are the configurations that will be imported by the clients through the SMTP session seen in the preceding paragraph:
<outbound-socket-binding name="mail-smtp"> <remote-destination host="localhost" port="25"/> </outbound-socket-binding>
To connect it to Gmail, simply change the remote-destination host
property, as illustrated:
<remote-destination host="smtp.gmail.com" port="587"/>
- Go to the WildFly web console to set the authentication properties:

- Click on the
View
button; you will find this page:

- You can see the reference to the
mail-smtp
output socket binding configured in thestandalone.xml
file. We can set the three authentication properties by clicking on theEdit
button:
Use SSL? | Does server require SSL? |
Username | Username to authenticate on server |
Password | Password to authenticate on server |
To use Gmail, simply set SSL to true and put...