Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > J2EE
|
J2EE General J2EE (Java 2 Enterprise Edition) discussions. Questions not specific to EE will be redirected elsewhere.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the J2EE section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 14th, 2004, 11:18 PM
Registered User
 
Join Date: Apr 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Java Mail Problem in WebSphere

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,





Similar Threads
Thread Thread Starter Forum Replies Last Post
i have the problem on java mail somebody resolve senthilrm J2EE 0 June 29th, 2007 06:46 AM
Logging problem with IBM Websphere 6.1 NEO1976 Pro Java 0 April 20th, 2007 09:01 AM
Websphere server 6.0 startup problem dshashi1234 J2EE 0 February 2nd, 2007 12:11 AM
problems sending mail with java mail gandacuboy J2EE 2 December 20th, 2006 03:05 PM
Websphere App server starting problem chitrar J2EE 0 September 21st, 2004 11:27 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.