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. public class Overload2 {


View Tutorial          By: ITMIT at 2011-06-05 19:16:46

2. Can some body throw more light on TRANSIENT ....
View Tutorial          By: Anish at 2010-08-03 07:30:58

3. hey what If I'm connecting to a server(XMPP in my
View Tutorial          By: garima at 2015-08-10 13:23:40

4. i tried your code but i got an error on this line<
View Tutorial          By: edward at 2011-12-09 11:32:30

5. can u plz send me jsf material in my gmail.
View Tutorial          By: rajesh at 2013-06-09 11:40:11

6. thanks for this tutorial
View Tutorial          By: d3ptzz at 2009-08-03 23:38:57

7. Good Example ...For Both FIleWriter and FileReader
View Tutorial          By: karthikeyan.v at 2009-11-17 02:27:42

8. Good Artical - Vagha
View Tutorial          By: Bharat at 2010-07-20 23:19:19

9. You have to run the compiled PortScanner with two
View Tutorial          By: KRook at 2009-10-15 04:11:53

10. Hi Jim, to get the code for this clock, right clic
View Tutorial          By: Rajan at 2008-04-11 08:25:03