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



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. The smiple easy and best way is :)
--------

View Tutorial          By: Sandhya at 2012-06-21 06:08:25

2. good....
View Tutorial          By: Rini at 2013-01-08 10:44:54

3. Hi ! do u know have use FileOutputStream in Surfac
View Tutorial          By: lukas at 2011-07-18 16:55:20

4. answers to the questions asked by ranjan in commen
View Tutorial          By: A Sadist at 2012-07-05 12:13:45

5. i am getting a error when try this sms application
View Tutorial          By: Prabhash at 2009-06-03 06:45:26

6. respected Sir , I am doing B.Tech . I want to know
View Tutorial          By: naveen juneja at 2011-09-18 07:58:04

7. Nice n simple ex!!!!!!!!!!!!!!!!!!!
View Tutorial          By: Siya at 2010-11-17 07:08:34

8. i'm doing project on hotel management...
an

View Tutorial          By: prashant patil at 2012-08-19 05:16:20

9. Thanks Jagan!!!!!!
View Tutorial          By: Maahe at 2012-07-06 05:23:51

10. hi all !

This is the error im getti

View Tutorial          By: Ajit at 2010-02-17 23:09:47