First of all this is not for the book. This is a real query. I have seen a lot of posts which seems to be fabricated for winning the book. But this is a real problem.
I want to know how to send mails from
jBoss. A google search revealed something which confused me. It said that mail sending is done through a bean
java:/email or something. This confused me. I am using javax.mail.Transport to send the mail. The code is like this
Now it gives an exception when the connect method is called
javax.mail.MessagingException: Could not connect to SMTP host: 127.0.0.1, port: 25;
nested exception is:
java.net.SocketException: Software caused connection abort: connect
Now there are a few things I am not sure of. First of all I think the username and password given when calling connect method are those defined in the mail-service.xml in jBoss. Also is mailing on directly in jBoss or do I have to start it by configuring it.
I would be thankful to anyone who could help...