webtier@glassfish.java.net

Configuring Java Mail Session

From: <webtier_at_javadesktop.org>
Date: Thu, 11 Feb 2010 08:05:34 PST

I have configured a mail session in glassfish v3 with Mail Host to my SMTP server
but i run my page that sends an email that throws the following exception
javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;
  nested exception is:
        java.net.ConnectException: Connection refused: connect
        at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1706)
        at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:525)
        at javax.mail.Service.connect(Service.java:291)
        at javax.mail.Service.connect(Service.java:172)

it looks that its finding smtp server locally not that which i have provided when configuring
mail session any help would be appriciated
thanks
[Message sent by forum member 'duke_nuke' (khurram_noor_at_msn.com)]

http://forums.java.net/jive/thread.jspa?messageID=386150