• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Urgent!! Please Help Java Mail & WAS problem

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,
Vishnu
 
Ranch Hand
Posts: 1551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you using the method shown in Sun's J2EE tutorial, section Mail Session Connections?
 
If you are using a rototiller, you are doing it wrong. Even on this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!