permaculture playing cards*
The moose likes Other JSE/JEE APIs and the fly likes Can't send command to SMTP host; Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Can Watch "Can New topic
Author

Can't send command to SMTP host;

Hella KG
Greenhorn

Joined: Aug 21, 2001
Posts: 1
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

Joined: Jun 19, 2001
Posts: 31
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

Joined: Dec 10, 2008
Posts: 2
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") ;


SCJP, SCWCD
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can't send command to SMTP host;