| Author |
JavaMail: Could not connect to SMTP host: localhost, port: 25;
|
Sundarajan Srinivasan
Greenhorn
Joined: Apr 27, 2012
Posts: 8
|
|
This is my simple code to send a mail:
Sometime I face even 404 error. Please do help.
|
 |
Koen Aerts
Ranch Hand
Joined: Feb 07, 2012
Posts: 344
|
|
|
What smtp server do you have set up on your localhost? Is it listening on port 25 or a different one? The netstat command might be useful.
|
 |
William P O'Sullivan
Ranch Hand
Joined: Mar 28, 2012
Posts: 860
|
|
Koen is correct.
If you do not have an email server/relay on localhost then of course it will fail.
You would normally only find those on a server, such as provided by an ISP or internal network group.
WP
|
 |
Sameera Jayasekara
Greenhorn
Joined: Mar 06, 2011
Posts: 5
|
|
This is my code for sending emails using Gmail SMTP settings.See it sometimes it may useful to you.
See http://codesstore.blogspot.com/2011/10/send-email-in-java-with-gmail.html
|
Bachelor of Computer Science | SCJP 5(97%) | SCWCD 5(100%) | SCBCD 5(100%) | http://codesstore.blogspot.com/
|
 |
 |
|
|
subject: JavaMail: Could not connect to SMTP host: localhost, port: 25;
|
|
|