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. this site is good, can anyone plz suggest me how t
View Tutorial          By: Prithvi at 2008-08-27 01:09:56

2. Thanks! Very helpful in creating a program i am tr
View Tutorial          By: BHaos at 2014-12-05 16:32:53

3. i tried with d above code but am getting an error
View Tutorial          By: Aishwarya at 2009-04-05 04:41:17

4. in my case the culprit is xdebuger dll version 2.0
View Tutorial          By: putra at 2009-12-18 00:39:42

5. how to solve this problem

javax.com

View Tutorial          By: rajani at 2009-07-18 05:44:55

6. very good tutorial..
View Tutorial          By: shobhit at 2010-05-04 12:17:41

7. Cool! Downloading the whole file with the HttpCon
View Tutorial          By: Luddite at 2010-06-26 12:26:26

8. thats good. but not for the begineers. because in
View Tutorial          By: jaywant topno at 2009-10-31 10:05:43

9. I have altered the code as described (xml addition
View Tutorial          By: Spijker at 2015-10-14 12:27:47

10. i searched a lot of sites but found the answer her
View Tutorial          By: ALIEN ATTACK at 2012-01-09 09:39:36