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. Your code will not execute using above main method
View Tutorial          By: Gajanan Patil at 2012-05-09 04:42:29

2. Thank you for your simple example which will help
View Tutorial          By: eekld at 2012-01-04 15:46:48

3. Also note that for reverse ordering, If you have a
View Tutorial          By: Dwight at 2011-07-13 22:13:45

4. sir ji,
i want do learn for loop in java an

View Tutorial          By: Prabhakar at 2009-11-06 00:48:53

5. I have one doubt from drop down box, i have two va
View Tutorial          By: subash at 2008-11-09 22:27:45

6. Easy to understand.......
View Tutorial          By: Priya at 2013-02-15 10:55:52

7. thanks or the infromation about switch statement
View Tutorial          By: mikko at 2008-09-01 23:48:44

8. Hi,
Very Nice explanation ,I tried both mem

View Tutorial          By: Harsh Verma at 2013-01-30 13:43:05

9. Very Very nice explanation...
View Tutorial          By: anil at 2010-11-04 00:22:58

10. vinod kumar for j2me app development we need one I
View Tutorial          By: saurabh dixit at 2013-04-18 09:59:23