Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Could not connect to SMTP host: localhost, port: 25;

843830Jan 27 2005 — edited May 25 2009
Hi ,

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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 22 2009
Added on Jan 27 2005
30 comments
31,097 views