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