简体   繁体   中英

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM