How to send an email with attachment using JBoss EAP 6?

Solution Verified - Updated -

Environment

RedHat JBoss Enterprise Application Platform (EAP) 6.x

Issue

Is it possible to send email using JBoss ?

Resolution

It is possible by using mail subsystem in JBoss. To configure it make use of configuration file (standalone/domain xml) . See JBoss EAP - Admin Guide refers to How to configure mail subsystem with EAP 6.

For sample application on quick start refer to mail project in github. It is not possible to send the attachment with the JBoss mailing subsystem, this can be possible by writing code/logic in application code.

Note :
See attached application for sample code. Make sure to make changes in server address, user name, password accordingly in application code.

Attachments

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments