This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin 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: 24217
38
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!