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. Nice explanation. And a good example to back it up
View Tutorial          By: fazil at 2009-07-29 00:32:03

2. what's the purpose of indexOf('t',10)
View Tutorial          By: pevi at 2011-02-22 04:23:20

3. i don't know anything about computer..........
View Tutorial          By: Ami weds Pappu....... at 2013-02-14 04:00:11

4. I have a site fully based on php and mysql.The log
View Tutorial          By: titus at 2011-06-14 00:52:30

5. It seems like your getConnection doesnt recognize
View Tutorial          By: Partha at 2009-11-28 11:32:53

6. I am java developer and interested to write scjp e
View Tutorial          By: Parvathi at 2013-07-05 14:24:08

7. its really helpful.thanks a lot
View Tutorial          By: bena at 2015-03-04 10:39:46

8. if the number is for exemple 00025478 it return a
View Tutorial          By: ahmed at 2015-02-11 12:02:45

9. nice tutorial,but if provided with the complete ex
View Tutorial          By: Prasant Kumar Sahu at 2013-01-07 13:17:20

10. how can i use <img> tag in message body?

View Tutorial          By: Sonal at 2012-11-07 07:05:33