David, A troubleshooting idea. I'd isolate this problem by ensuring you can communicate directly via javamail. Try a simple test such as this (in a JSP will work fine)...
String host = "smtp.verizon.net"; String from = "[EMAIL PROTECTED]"; String to = "[EMAIL PROTECTED]"; // Get system properties Properties props = System.getProperties(); // Setup mail server props.put("mail.smtp.host", host); // Get session Session mailsession = Session.getDefaultInstance(props, null); // Define message MimeMessage message = new MimeMessage(mailsession); // Set the from address message.setFrom(new InternetAddress(from)); // Set the to address message.addRecipient(Message.RecipientType.TO, new InternetAddress(to)); // Set the subject message.setSubject("Test message"); // Set the content message.setText("Testing"); // Send message Transport.send(message); If this works.. then I'd suspect something in TC or your config. If it doesn't.. you might want to post this info. to the javamail list. Lots of helpful people over there. Good luck, Shawn. > yes, I stopped and restarted the Tomcat service. > > Denis Haskin wrote: > >> From the error, looks like it's still trying to connect to an smtp >> server at localhost. Did you restart Tomcat after changing >> mail.smtp.host? >> >> dwh >> >> David Diskin wrote: >> >>> I've just set up Tomcat 4.1.18 on my Windows XP Home PC. I >>> installed it as a service. I have no problem connecting to the >>> Tomcat main web page. I reconfigured conf/server.xml and changed to >>> value of mail.smtp.host to "smtp.verizon.net", my isp mail server. >>> However, when I go to run the jsp send mail example, I get the >>> following exception. Can anyone help on this? >>> ====================================================== >>> ENCOUNTERED EXCEPTION: javax.mail.SendFailedException: Sending >>> failed; nested exception is: javax.mail.MessagingException: Could >>> not >>> connect to SMTP host: localhost, port: 25; nested exception is: >>> java.net.ConnectException: Connection refused: connect >>> >> >> >> -- >> To unsubscribe, e-mail: >> <mailto:[EMAIL PROTECTED]> >> For additional commands, e-mail: >> <mailto:[EMAIL PROTECTED]> >> >> > > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> For additional > commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>