Comment on Tutorial - Sending Email from Java application (JavaMail sample program) By Narayanan



Comment Added by : Rod

Comment Added at : 2011-11-13 15:09:52

Comment on Tutorial : Sending Email from Java application (JavaMail sample program) By Narayanan
Hello, I have been using a very similar code on development of a email verification system. All have worked fine in local system (i.e. my computer) but now, when I deploy to production server I'm getting the following exception.

DEBUG: setDebug: JavaMail version 1.4.4
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "smtpout.mysmtpserver.ext", port 3535, isSSL false
DEBUG SMTP: EOF: [EOF]
DEBUG SMTP: could not connect to host "smtpout.mysmtpserver.ext", port: 3535, response: -1

javax.mail.MessagingException: Could not connect to SMTP host: smtpout.secureserver.net, port: 25, response: -1
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1922)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:638)

This is just beyond my knowledge. I have tried changing the port to 25 but still get the same error. And again, works fine locally but crashes in server.
I would greatly appreciate it if you could at least give me a light here.
Thanks in advance.


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. hi! this coding is very helpful for me thanks .
View Tutorial          By: bhuvaneshwari at 2009-10-18 23:52:58

2. hi ,
i tried the code given, the connect

View Tutorial          By: barani at 2010-05-27 05:32:11

3. Hi, it looks great!
I'm just starting with

View Tutorial          By: Bertrand at 2013-04-28 19:20:42

4. very nice session
View Tutorial          By: Rajendra singh rathod at 2012-03-16 13:32:01

5. Please help here...
I tried both 0300460423

View Tutorial          By: Zafar Iqbal at 2013-04-02 20:14:29

6. can u please send me the code for sending sms from
View Tutorial          By: Vicky at 2008-03-20 02:34:27

7. Imports Excel = Microsoft.Office.Interop.Excel

View Tutorial          By: Nilesh at 2014-12-01 13:45:25

8. Thanks a ton! :)
View Tutorial          By: Prateek at 2015-03-12 11:40:08

9. Hi Friends,

I got a very interestin

View Tutorial          By: Rohit Kapur at 2011-07-27 20:56:57

10. IT IS VERY USEFUL FOR BEGINNERS
View Tutorial          By: Adhi Rudran at 2007-04-16 02:58:47