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. where i put this rar file to include comm api
View Tutorial          By: shubham bansal at 2015-02-20 12:13:16

2. help, i want to migrate my system (asp to jsp)

View Tutorial          By: gendull at 2007-02-25 21:03:20

3. precisely the drawbacks I am trying to address in
View Tutorial          By: ernest at 2011-02-05 02:16:13

4. Hi Friends.... Can you please send the working ver
View Tutorial          By: shafi at 2010-02-18 08:28:49

5. Dear author
u missed check condition for 0(

View Tutorial          By: Maroof Ahmad at 2012-03-28 14:59:53

6. This tutorial is very good. Actually I have been s
View Tutorial          By: farhaan at 2008-03-20 15:22:13

7. i need some more basic java programs in all type
View Tutorial          By: jkamal at 2012-11-05 04:57:49

8. Hi Jgan,
Its very useful ad nice article .

View Tutorial          By: pramod at 2012-01-16 13:21:35

9. Its working ,,, gud stuff.
View Tutorial          By: Atul at 2011-07-21 10:34:44

10. Can you send me the full code for sending sms usin
View Tutorial          By: Tamizh chelvam at 2014-03-24 17:30:52