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



Comment Added by : Barabas

Comment Added at : 2010-02-11 03:57:09

Comment on Tutorial : Sending Email from Java application (JavaMail sample program) By Narayanan
When copying this code into my java IDE, should i configure any thing else in my conputer?
The IIS smtp server ?

I'm lost here because the code does't work with me and throwing this exception:

javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port:25;
nested exception is:
java.net.ConnectException: Connection timed out: connect
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1706)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:525)
at javax.mail.Service.connect(Service.java:313)
at javax.mail.Service.connect(Service.java:172)
at javax.mail.Service.connect(Service.java:121)
at javax.mail.Transport.send0(Transport.java:190)
at javax.mail.Transport.send(Transport.java:120)


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. it is very nice example of overloading when i read
View Tutorial          By: narendra saini at 2012-04-20 04:03:56

2. Thanks a lot for this great post.
View Tutorial          By: Ram Para at 2012-03-23 17:07:09

3. Hello Everyone
I used this program but i'm

View Tutorial          By: Yougeshwar Khatri at 2011-09-16 08:50:47

4. i need a J2me PIM for accessing phone contact... <
View Tutorial          By: shafique at 2011-06-28 04:11:55

5. Hi ,
please i need j2me appliacation :

View Tutorial          By: youyou92 at 2014-12-01 18:20:52

6. Just used InstallCert.java successfully so that my
View Tutorial          By: Anthony Pelosi at 2009-12-30 15:52:17

7. Its super explanation
View Tutorial          By: jose at 2011-12-08 13:36:29

8. very simple to understand
View Tutorial          By: chermaraja at 2010-05-26 00:00:05

9. Thanks a lot man with the server -side code.
View Tutorial          By: bot at 2011-12-03 15:04:28

10. Hi wei long, did you download all the five program
View Tutorial          By: Ramlak at 2008-06-23 03:26:31