Hi guys. I have wrote a simple Java class to send an email to "firstname.lastname@example.org" address from the "email@example.com" adress.
but I have got the following exceptions : MessagingException : could not connect to SMTP host mail.lycos.com, port 25 nested exception is : SocketException : Network is unreachable so, is mail.smtp.host property refers to the reciever host or to sender host ?? is every smtp mail server has the following format : mail.smtp.host like : mail.smtp.yahoo or mail.yahoo.com ?? please, I need help, because JavaMail is a vital subject me....
SMTP name is for the Send Mail Transport Protocol** -- It's the name of a host that will send your message. Take a peek in your regular email program options and you'll probably see the info you need to plug. If that doesn't help perhaps you could discuss with a network admin or whoever set up your email for the correct SMTP (aka SendMail) address. PKNH ** exact acronym I'm not sure -- could be Send Mail Transport Program but you get the idea. PKNH
Hi John: I just have a question for you. Why are you using Session.getDefaultInstance() method as oppose to Session.getInstance(). When you use getDefualtInstance it return a Session object that is shared among all application running in the same JVM. Isn't a security hole? for example, if another application reset the security parameters on the defualt Session instance, then your application will not be able to access it anymore. I am not criticising your choice, I just want to know why? thanks
SCJD 1.4<br />SCJP 1.4<br />-----------------------------------<br />"With regard to excellence, it is not enough to know, but we must try to have and use it.<br />" Aristotle