users@glassfish.java.net

Re: Setup of Glassfish Email to use remote server and Port

From: <glassfish_at_javadesktop.org>
Date: Tue, 25 Mar 2008 05:02:50 PST

Actually:

   I have already looked at the Javamail docs (as indicated in another post in this forum) and actually set the "mail.smtp.port" value to 993 (sorry; I forgot to put that setting in my previous post).

   That is one of the things that is perplexing about this problem. Despite the fact that I did add a property called "mail.smtp.port" which I *did* set to 993, Glassfish insists upon attempting to use Port 25:

javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;
  nested exception is:
        java.net.ConnectException: Connection refused
        at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1391)
        at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:412)
        at javax.mail.Service.connect(Service.java:288)
        at javax.mail.Service.connect(Service.java:169)
...etc

In other words, Glassfish is not passing anything to Javamail, or if it is, it is still trying to pass it through the wrong port!

   As for theSMTPSSLTransport class: I was unaware of this class and did attempt to use it for the transport protocol. It made no difference, though; Glassfish still insists upon attempting to access email through "localhost" and Port 25. It doesn't seem to matter what is used as a transport if the blasted system keeps ignoring all the other settings!
[Message sent by forum member 'factor3' (factor3)]

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