Während gesendeten E-Mail zeigt Fehler:Verbindung zum SMTP-Host konnte nicht hergestellt werden: smtp8.net4india.com, Port: 25;
javax.mail.MessagingException: Could not connect to SMTP host: smtp8.net4india.com, port: 25;
nested exception is:
java.net.ConnectException: Connection timed out: connect
Meine E-Mail-Einstellungen ist:
String mailProcessed = "";
Properties props = new Properties();
props.put("mail.smtp.host", "smtp8.net4india.com");
props.put("mail.smtp.socketFactory.port", "25");
props.put("mail.smtp.socketFactory.class","javax.net.ssl.SSLSocketFactory");
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.port", "25");
props.put("mail.smtp.starttls.enable", "true");
Session session = Session.getDefaultInstance(props,
new javax.mail.Authenticator() {
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(frmMail, frmPass);
}
});
tried..but ohne luck..same Fehler .. – next2u
versuchen Eigenschaft hinzuzufügen: 'mail.smtp.ssl.enable = true' –