File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Websphere and the fly likes Java Mail on Websphere .. plz Help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Java Mail on Websphere .. plz Help " Watch "Java Mail on Websphere .. plz Help " New topic

Java Mail on Websphere .. plz Help

Jack Daniel
Ranch Hand

Joined: Jun 15, 2002
Posts: 163
Firstly I am using WDSC on iseries 5.1 , on development side and WAS-Express 5.1 as production server;

I am starting to learn sending/reading e-mail thru java-mail API (which is part of J2ee, anyway )

I have a small servlet which sends e-mail (using MS Exchange as the Mail server);

It RUNS PERFECTLY on my development server; but gives a problem on my Production Server (on AS400)

I also have a JSP form page from where this servlet reads the request parameters;

My development side (WTE server on WDSC), has no problem in creating a Session with Mail server (i anyway have OutLook connected to Exchange server, so I guess it identifies the mail server and No prob with the servlet)

BUT talking about Production Server (WAS on iseries), it gives an error

[10/26/04 18:36:48:045 UTC] f4e9d255 SystemErr R Messaging exception: Sending failed;
nested exception is:
javax.mail.MessagingException: Unknown SMTP host: ***SERVER;
nested exception is: ***SERVER

where ***SERVER is the host name of the Mail server (whose ip address is mentioned in the code)

anybody has a clue on how to sort this problem???

I really appreciate your help in this matter, very much.

Thanks a lot
rakkesh kumar
Ranch Hand

Joined: Oct 06, 2004
Posts: 37
you should give the Ip address of the SMTP server.

tehn it will work properly
Jack Daniel
Ranch Hand

Joined: Jun 15, 2002
Posts: 163
Thanks rakkesh ...

correct me, if i am wrong.. But I guess the mail server has both the SMTP server and POP3/IMAP server running, on the same machine..

So the IP address of the mail Server and the SMTP server should be the same..??

Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1082


if your both server SMTP and POP are on same machine then definitely IP address will be same.

but what makes difference is the PORT

POP server run on 110 PORT however SMTP runs on PORT 25


Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
I agree. Here's the link:
subject: Java Mail on Websphere .. plz Help
It's not a secret anymore!