Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can't send command to SMTP host;

 
Hella KG
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!
When I try to send an Email via JAVAMAIL i get this error:
javax.mail.MessagingException: Can't send command to SMTP host;
nested exception is:
java.net.SocketException: Socket closed
java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
javax.mail.MessagingException(java.lang.String, java.lang.Exception)
void com.sun.mail.smtp.SMTPTransport.sendCommand(java.lang.String)
void com.sun.mail.smtp.SMTPTransport.close()
void javax.mail.Transport.send0(javax.mail.Message, javax.mail.Address [])
void javax.mail.Transport.send(javax.mail.Message)
void de.hella.mailer.ejb.MailHelper.createAndSendMail(de.hella.mailer.ejb.EMailMessage)
void de.hella.mailer.ejb.MailerBean.sendMail(de.hella.mailer.ejb.EMailMessage)
void de.hella.mailer.ejb.EJSRemoteMailer.sendMail(de.hella.mailer.ejb.EMailMessage)
org.omg.CORBA.portable.OutputStream de.hella.mailer.ejb._EJSRemoteMailer_Tie._invoke(java.lang.String, org.omg.CORBA.portable.InputStream, org.omg.CORBA.portable.ResponseHandler)
com.ibm.rmi.ServerResponse com.ibm.CORBA.iiop.ExtendedServerDelegate.dispatch(com.ibm.rmi.ServerRequest)
com.ibm.rmi.ServerResponse com.ibm.CORBA.iiop.ORB.process(com.ibm.rmi.ServerRequest)
void com.ibm.CORBA.iiop.WorkerThread.run()
void com.ibm.ejs.oa.pool.ThreadPool$PooledThread.run()
What is the problem? Can anyone help me?`
Thanks a lot!
VJAY
 
Jamie Young
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not familiar with your problem. I found this solution. I hope it can be of some help.

For JDK 1.2 the mailcap file has to go into jre/lib because that is the actual Java VM lib directory.
------------------
 
Rajjul Singh
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try out by desabling TLS, the cause is that your mail server doesn't use TLS so I just disable it in your mail server like this properties.put("mail.smtp.starttls.enable","false") ;
 
Paul Clapham
Sheriff
Pie
Posts: 20758
30
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I very much doubt that was the problem nine years ago. The idea of secured e-mail barely existed then and JavaMail certainly didn't support it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic