MessagingException: Exception reading response
843834Jul 31 2008 — edited Aug 1 2008Hi
I am getting the below MessagingException
Exception reading response
at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1611)
at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1494)
at com.sun.mail.smtp.SMTPTransport.finishData(SMTPTransport.java:1321)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:637)
at javax.mail.Transport.send0(Transport.java:189)
at javax.mail.Transport.send(Transport.java:118)
At first glance it looked like the connection to the server timed out or was lost, however the message was delivered to the recipients mail box. Any help on this will be greatly appreciated. Below is the code that I am using:
try{
Properties props = new Properties();
props.put("mail.smtp.host", host);
props.put("mail.smtp.connectiontimeout","30000");
props.put("mail.smtp.timeout","30000");
props.put("mail.smtp.quitwait", "false");
props.put("mail.smtp.localhost",helo);
props.put("mail.smtp.ehlo", "false");
Session session = Session.getInstance(props, null);
Transport.send(msg);
} catch (MessagingException mex) {
}
Thanks
Giepa