The Artima Developer Community
Sponsored Link

Java Answers Forum
Java Mail problem in WAS 5.0

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
vempati

Posts: 1
Nickname: j2eeguy
Registered: Apr, 2004

Java Mail problem in WAS 5.0 Posted: Apr 14, 2004 9:43 PM
Reply to this message Reply
Advertisement
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

[4/14/04 16:58:41:645 EDT] 68225f1b SystemOut O DEBUG SMTP RCVD: 220 nj024idh.unix.us.ups.com ESMTP Sendmail AIX5.1/8.11.6p2/8.11.0; Wed, 14 Apr 2004 16:58:41 -0400

[4/14/04 16:58:41:646 EDT] 68225f1b SystemOut O DEBUG: SMTPTransport connected to host "localhost", port: 25

[4/14/04 16:58:41:646 EDT] 68225f1b SystemOut O DEBUG SMTP SENT: EHLO nj024idh
[4/14/04 16:58:41:646 EDT] 68225f1b SystemOut O DEBUG SMTP RCVD: 250-nj024idh.unix.us.ups.com Hello loopback [127.0.0.1], pleased to meet you

2)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 12:56:26:674 EDT] 5917e184 SystemOut O DEBUG SMTP: useEhlo true, useAuth false
[4/14/04 12:56:26:674 EDT] 5917e184 SystemOut O
DEBUG: SMTPTransport trying to connect to host "njrarsvr07eb.ams1907.com", port 25

[4/14/04 12:56:26:675 EDT] 5917e184 SystemOut O javax.mail.SendFailedException: Sending failed;
nested exception is:
javax.mail.MessagingException: Unknown SMTP host: njrarsvr07eb.ams1907.com;
nested exception is:
java.net.UnknownHostException: njrarsvr07eb.ams1907.com
[4/14/04 12:56:26:675 EDT] 5917e184 SystemOut O at javax.mail.Transport.send0(Transport.java(Compiled Code))

Thanks and Regards,

Topic: jtable loosing focus Previous Topic   Next Topic Topic: A11Y and I18N testing of Java based GUIs

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use