This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes JavaMail connection refused Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "JavaMail connection refused" Watch "JavaMail connection refused" New topic
Author

JavaMail connection refused

Claudia Vaz
Ranch Hand

Joined: Nov 13, 2001
Posts: 44
Hello
I am trying to use the JavaMail to send messages.
Unfortunately i can't connect to the mail server. I get the following message:
"Exception in thread "main" javax.mail.SendFailedException: Sending failed;
nested exception is:
javax.mail.MessagingException: Could not connect to SMTP host: SEMBOM04XMS01.rl.mcnet.pt, po
rt: 25;
nested exception is:
java.net.ConnectException: Connection refused: connect
at javax.mail.Transport.send0(Transport.java:219)
at javax.mail.Transport.send(Transport.java:81)
at JDCAttach.main(JDCAttach.java:47)
"
I already checked that the mail server is on.
What's the problem???
Thanks
Claudia Vaz
Lewin Chan
Ranch Hand

Joined: Oct 10, 2001
Posts: 214
java.net.ConnectException: Connection refused: connect
means exactly that, the remote server is not accept this connection attempt.
Have you tried, from the machine where your program is running, the command

If you get standard "220 sendmail response" - e.g.

then it may be a security thing for the program


I have no java certifications. This makes me a bad programmer. Ignore my post.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JavaMail connection refused
 
Similar Threads
SMTP Connection
Unable to connect using JavaMail
connect to an IMAP server
RMI Exception
urgent help in java mail