tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Hoh <>
Subject Problems using multiple Sendmail daemons on same machine
Date Thu, 01 Aug 2002 08:36:26 GMT

I have a machine that is running 2 instances of Sendmail, one on the 
normal SMTP port 25, and another on port 2121. Now most of the JSP pages 
that send off email use the normal Sendmail on port 25, but some use the 
other on port 2121 (don't ask me why, long story). In the pages that use 
port 2121, I set the property "mail.smtp.port" to 2121 (ie. 
props.put("mail.smtp.port", "2121"); ) and in the others, I leave them 
to default to port 25. The strange thing is, if I first visit a page 
that sends off an email on the normal port 25, it works fine (I know so 
because I turn off the Sendmail instance that is running on port 2121) 
and the email is delivered. Then when I start up the Sendmail that 
listens on 2121 and visit a page that sends an email throught this 2121 
port, it too works fine and the email is delivered. But, when I kill the 
Sendmail process that's listening on port 2121 and revisit the same page 
that should send email on the normal SMTP port 25, it throws an 
exception saying it can't connect to port 2121.

I thought it might be because when I retrieve the default 
javax.mail.Session object instance using Session.getDefaultInstance() it 
keeps returning me the same instance of that Session object for the life 
of the Tomcat container but when I tried using Session.getInstance() 
instead to get a new Session object, it still does the same thing.

What's going on? Did anybody understand what I just said :) I'm 
completely puzzled and out of ideas. HELP!!

Oh yeah, Tomcat v3.2.24, JavaMail 1.2, JDK1.3.1.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message