Re: SMTP Server excption while sending (Could not connect to SMTP host)
Posted By:
iulius_hide
Posted On:
Thursday, March 13, 2003 12:30 AM
i had the same problem.At the end try this:
Transport transport=session.getTransport("smtp");
transport.connect(outMailServer,user,password);
transport.sendMessage(newMessage,newMessage.getAllRecipients());
transport.close(); <---it'a a must
transport object must be closed
Good luck!!!
Iulius