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. hi..i can send 4 or 5 sms per mnt..is there any wa
View Tutorial          By: rahul at 2011-02-11 00:17:51

2. Nevermind, I was able to modify both applications
View Tutorial          By: Matthew at 2009-06-16 14:10:20

3. u can try this out it will satisify u:)
imp

View Tutorial          By: vallabh at 2014-10-04 17:44:18

4. Excellent example Jagan. By the way I have a quest
View Tutorial          By: Shrihas at 2012-01-07 14:12:48

5. Hi, i am new java, and i want to become gud develo
View Tutorial          By: amit at 2012-02-16 12:21:25

6. me too got the same problem....
but m sure

View Tutorial          By: HEHE at 2008-11-19 01:49:04

7. This code rocks!! any one having any trouble shoul
View Tutorial          By: Ankur at 2010-01-22 06:37:10

8. I do my projest in j2me.so please send me your ide
View Tutorial          By: sivasakthivel.s at 2011-06-22 13:26:54

9. Excellent tutorial thank you very much.

View Tutorial          By: Edd at 2012-01-15 10:49:00

10. excellent
View Tutorial          By: amit gupta at 2012-07-03 12:31:31