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

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

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?

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top