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



Ask a Question

Subscribe to Tutorials

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. Very good explanation but i need to know how the c
View Tutorial          By: surender at 2011-11-17 11:15:22

2. Hi Jon,

It really depends on the ap

View Tutorial          By: Hong at 2009-05-04 20:40:28

3. Thank you, this tutorial is well-written and made
View Tutorial          By: Adrien T├ętar at 2012-10-28 19:01:57

4. The one more best way is

public cl

View Tutorial          By: Palla Subramanyam at 2012-01-25 20:18:03

5. Hi!
Any body have code for recieving sms fr

View Tutorial          By: Haseeb at 2009-07-01 04:59:13

6. About the javax.comm.* error, you need to include
View Tutorial          By: Nicolas Tourne at 2011-12-18 15:11:05

7. very very thankssssssssssssssss
View Tutorial          By: gowtham at 2010-07-31 22:58:36

8. I went befly through this, it is woderful, usefull
View Tutorial          By: Mallikarjuna.N at 2009-11-28 11:41:58

9. Hi Braj,
You are probably using threads to

View Tutorial          By: Ramlak at 2009-01-29 20:03:14

10. Finally! You enlighted me in a small problem: it w
View Tutorial          By: Fernando Martin at 2011-02-25 12:54:58