I have configured JBoss 5.0 Server for send email whenever a task is successful or not. I have also configured the DataSource in JBoss and it is working fine. My questions is " how to send email, whenever a exception occurs, such as HTTP 500 , data base connection exception, etc., from JBoss Server"