Could not connect to SMTP host: localhost, port: 25;
843830Jan 27 2005 — edited May 25 2009Hi ,
I have a JSP pages with a few text boxes and am trying to send an email when the form is submitted.
I have followed the example of sending Mail with JavaMail API at http://java.sun.com/developer/JDCTechTips/2001/tt1023.html
When I run the program I get this error,
Error: javax.mail.SendFailedException: Sending failed; nested exception is: class javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25; nested exception is: java.net.ConnectException: Connection refused: connect
I changed the server.xml to reflect my mail server " xxxxxx.us.mycompany.com".
I dont understand why the its still using my localhost for sending the email.
Suggestions pls..
Thanks,
bobby.