Re: When I set the system properties to my smtp host more than once the smtp host is the to localhost. Why?
Monday, June 25, 2001 09:10 AM
I had the same problem and I fixed it doing this:
Do not use session.getDefaultInstance(); use instead ssesion.getInstance(). It seems like there is a problem with the session the second time you try to use it or set properties.
If that fails to work, try not using Transport.send(). Use :
Transport transport =session.getTransport("smtp");
transport.connect(serv, user, pass);
I hope this should help you. Bye