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 

Properties props = new Properties();
  | Session mailConnection = Session.getInstance(props, null);
  | Transport tr = mailConnection.getTransport("smtp");
  | tr.connect("127.0.0.1","username","pass");

Now it gives an exception when when the connect method is called as-

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...

(I have also posted this on coderanch.com but not getting any reply there so 
cross posted it here)

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4203497#4203497

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4203497
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to