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



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. Help Me

I just run the ListPorts.ja

View Tutorial          By: srinivas at 2009-04-06 03:14:57

2. Good and Simple Example For Beginners Like me.Than
View Tutorial          By: Lasantha Bandara at 2010-06-29 19:21:48

3. really a nice tutorial for beginners...Thanks a lo
View Tutorial          By: ps at 2013-02-26 09:28:53

4. iam getting intrest to watch this site
View Tutorial          By: monika at 2013-02-15 15:48:57

5. excellent, very clear, thx!!!
View Tutorial          By: ma at 2010-04-07 07:42:47

6. How to Use Code in my Page ? plz give me the sugee
View Tutorial          By: jaty at 2015-08-19 12:25:20

7. This is probably a good java tutorial but it made
View Tutorial          By: lol at 2012-09-15 21:20:09

8. It's a good eg to learn join and isAlive method.Bu
View Tutorial          By: Nithin at 2012-02-02 08:43:28

9. Thanks !
View Tutorial          By: Swaran at 2010-02-02 23:50:13

10. how to connect the database in servelet use to sta
View Tutorial          By: sudhir singh tomar at 2011-04-28 03:10:34