• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JavaMail connection refused

 
Claudia Vaz
Ranch Hand
Posts: 44
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 214
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic