Comment on Tutorial - Sending Email from Java application (JavaMail sample program) By Narayanan



Comment Added by : Srinivas

Comment Added at : 2008-05-05 23:32:13

Comment on Tutorial : Sending Email from Java application (JavaMail sample program) By Narayanan
Hi professional,
I tried the above code but it is throwing the following error(i included mail.jar and activation.jar in the classpath also) Please help me out

javax.mail.MessagingException: Could not connect to SMTP host: 172.17.240.7, por
t: 25;
nested exception is:
java.net.SocketException: Software caused connection abort: connect
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1391)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:41
2)
at javax.mail.Service.connect(Service.java:288)
at javax.mail.Service.connect(Service.java:169)
at javax.mail.Service.connect(Service.java:118)
at javax.mail.Transport.send0(Transport.java:188)
at javax.mail.Transport.send(Transport.java:118)
at SimpleSendEmail.main(SimpleSendEmail.java:45)
Caused by: java.net.SocketException: Software caused connection abort: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:507)
at java.net.Socket.connect(Socket.java:457)
at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:233)
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1359)
... 7 more


View Tutorial



Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. Can anybody send me the java full code for sending
View Tutorial          By: David at 2010-08-22 22:57:38

2. hello after working with this code i got the follw
View Tutorial          By: Tapaswini Sabat at 2011-11-05 12:43:49

3. Hi,
I run the program on windows (connectin

View Tutorial          By: Razvan at 2010-10-13 06:04:24

4. could anyone run this program on Netbean? If there
View Tutorial          By: Wei Long at 2008-06-16 19:23:48

5. Thanks alot.. it helped me a lot...
View Tutorial          By: Sushmitha Rao at 2010-06-02 02:39:51

6. thxs
View Tutorial          By: uhhhhh........... at 2009-01-19 06:55:59

7. that is fifo rigth? how about lifo?
View Tutorial          By: galz at 2015-02-18 03:03:31

8. crystal clear explanation. He's explained very nic
View Tutorial          By: jay at 2009-12-08 10:28:14

9. hi! i want to know about how database createed in
View Tutorial          By: kundan at 2010-05-19 05:03:33

10. how to execute all the 5 files plz tell me step by
View Tutorial          By: asraf at 2007-11-14 22:29:20