Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

SMTP Connection  RSS feed

 
Yatin Shah
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
I am student of M S University. I am doing project on Continues Server Monitoring System based on RMI. I want to send mail while RMIException has been encountered. I am facing problem with SMTP Connection.
The Error is :

Exception in thread "main" javax.mail.MessagingException: Could not connect to SMTP host: mylinux.msubaroda.ac.in, port: 25;
nested exception is:
java.net.ConnectException: Connection refused: connect
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1152)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:28
8)
at javax.mail.Service.connect(Service.java:233)
at javax.mail.Service.connect(Service.java:134)
at javax.mail.Service.connect(Service.java:86)
at com.sun.mail.smtp.SMTPTransport.connect(SMTPTransport.java:138)
at javax.mail.Transport.send0(Transport.java:150)
at javax.mail.Transport.send(Transport.java:80)
at JDCSend.main(JDCSend.java:33)

Please, let me inform solution for this error.

Thanking You
Bye for now,
Yatin
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Welcome to JavaRanch!

The error says that JavaMail expected an SMTP server (a mail server like sendmail or postfix) to be running on mylinux.msubaroda.ac.in, but in fact there wasn't one. You need to either install one on that machine, or configure JavaMail to use an existing mail server on some other machine.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!