hi, I have 2 weird problems. 1) we have WebSphere App Server 5.0. our requirement is to send the email from the application once the user has changed his/her password. For this I'm using a property file which has SMTPserver IP address. In the application, using java mail api, setting the property mail.smtp.host and getting Session object and creating Message object etc and finally send using Transport.send. Here comes the problem. In the log file it says SMTPTransport trying to connect to localhostÂ… connected Â….. And sent Successfully. I don't understand why it is getting connected to "localhost" @ port 25 instead of the address (ex. 153.2.253.17) that I specified in the property file. This environment is DEV having only one AIX box running WAS 5.0.
2) The same application but running in different environment. The problem is almost same as above but, instead of "localhost" it always tries to connect to "njrarsvr07eb.ams1907.com" which I didn't specify in the property file. I had something else in the property file. Every time it ignores the IP address that is in the property file. WAS is defaulting to the "njrarsvr07eb.ams1907.com" SMTP server (which doesn't exist any more) and hence I get UnKnownHostException. Here the environment 2 servers, one being DeploymentManager and the other being the cluster of the DeploymentManger.
Here are the log files for the above scenarios:
1) IPAddress/name in the property file is : SMTPserver=magma-vip.ams1907.com #SMTPserver=63.171.196.144
Log FILE output:
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc] [4/14/04 16:58:41:640 EDT] 68225f1b SystemOut O DEBUG SMTP: useEhlo true, useAuth false [4/14/04 16:58:41:640 EDT] 68225f1b SystemOut O DEBUG: SMTPTransport trying to connect to host "localhost", port 25