Java - is there any advantage sending mail using JBOSS/WildFly mail service rather than Apache Commons Email?

StackOverflow https://stackoverflow.com/questions/23290014

Pregunta

right now to send emails from our application we use Apache Commons Email. I discovered that there is also a possibility to send mails through JBOSS (we use AS6 and WF8). In our app we alwyas use clients SMTP servers, we store the connections parameters (host, username, password, port, SSL/TLS config) in the database. Then Apache Commons uses this param to send emails. The app uses Spring for DI.

Is there any advantage using the "JBOSS way" rather than Apache Commons Email?

¿Fue útil?

Solución

In my opinion advantage is that the password, login and host is setted up in server container and you can easy deploy the same package on different environments with different SMTP settings without additional configuration. SMTP configuration is independent from application.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top