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



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. nice one
View Tutorial          By: navyasri at 2012-05-02 04:41:10

2. Can you explain when the user input through the ab
View Tutorial          By: mujmil at 2008-02-11 18:46:00

3. How can I store a file in device internal memory a
View Tutorial          By: Fabio at 2014-11-20 11:25:41

4. crystal clear explanation
View Tutorial          By: digant at 2009-12-08 09:10:06

5. How to fix this Error.....

org.apac

View Tutorial          By: james prabhakaran at 2014-12-02 13:08:30

6. I tried this code,but is showing this error

View Tutorial          By: anju at 2009-05-22 07:42:11

7. This is very clear and explains the concepts in a
View Tutorial          By: Reite at 2011-02-18 13:55:07

8. I have a sample code in which,

obje

View Tutorial          By: Tan Mi at 2011-10-25 23:24:10

9. regarding 'TextMessage' and 'MessageConnection' er
View Tutorial          By: gaurav at 2012-04-24 11:57:17

10. This tutorial is really fantastic.It helped me a l
View Tutorial          By: LakshmiNaryana Gorantla at 2010-04-19 23:35:45