I m a bit confused on setting SMTP host while sending email thru my
java mail program. What I do is:
1.Properties props = new Properties();
props.put("mail.smtp.host", "smtp.softhome.net");
2.I get the following console output:
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.s
mtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth false
DEBUG: SMTPTransport trying to connect to host "smtp.softhome.net", port 25
javax.mail.SendFailedException: Sending failed;
nested exception is:
javax.mail.MessagingException: Could not connect to SMTP host: smtp.softhome.net, port: 25;
nested exception is:
java.net.SocketException: no further information (code=10051)
at javax.mail.Transport.send0(Compiled Code)
at javax.mail.Transport.send(Transport.java:81)
at Mail.sendMail(Mail.java:35)
at MailMessage.main(MailMessage.java:229)
I might be using wrong smtpHost.
I use softhome.net as my POP server and I can pop mails from softhome.net to my outlookexpress (win98). But for some reason I m not able to send mails from outlook thru this POP.
I read on softhome that some ISP block port #25 to check spamming. I connect to internet via netzero and worldnet.att.net but in vain.
Incidentally, when I was in india and my ISP was jp1.dot.net.in and I could send mail thru the same javaMail program using "props.put("mail.smtp.host", "jp1.dot.net.in");" Even I used to POP mail from softhome.net into my outlook.