Java mail problem

R

ruds

Im trying to connect to my smtp host using Java Mail.
But i'm getting error as :
javax.mail.SendFailedException: Sending failed;
nested exception is:
javax.mail.MessagingException: Could not connect to SMTP host:
ttmsg01, port: 25;
nested exception is:
java.net.SocketException: Software caused connection abort:
connect
at javax.mail.Transport.send0(Transport.java:219)
at javax.mail.Transport.send(Transport.java:81)
at jsp_servlet.__succsaveana._jspService(__succsaveana.java:
400)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
at weblogic.servlet.internal.ServletStubImpl
$ServletInvocationAction.run(ServletStubImpl.java:1053)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:
387)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:
431)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:
305)
at weblogic.servlet.internal.RequestDispatcherImpl
$ForwardAction.run(RequestDispatcherImpl.java:342)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:
317)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
97)
at
weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:
246)
at AnaReqSubmit.doPost(AnaReqSubmit.java:188)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:
760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:
853)
at weblogic.servlet.internal.ServletStubImpl
$ServletInvocationAction.run(ServletStubImpl.java:1053)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:
387)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:
305)
at weblogic.servlet.internal.WebAppServletContext
$ServletInvocationAction.run(WebAppServletContext.java:6291)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:
317)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
97)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:
3575)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:
2573)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:
178)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151)


I'm not able to understand what is happening because all of my code is
according to Java mail specification.
 
L

Lothar Kimmeringer

ruds said:
I'm not able to understand what is happening because all of my code is
according to Java mail specification.

All you need to know is the message in the stacktrace:
javax.mail.SendFailedException: Sending failed;
nested exception is:
javax.mail.MessagingException: Could not connect to SMTP host:
ttmsg01, port: 25;
nested exception is:
java.net.SocketException: Software caused connection abort:
connect

The connect failed. There might be a firewall blocking the request
or some other network-related problem. You can try to connect the
host "by hand" doing a
telnet ttmsg01 25
on the console. Only if you see a welcome-message from the
mail-server, you can continue looking into your own program
to find errors.


Regards, Lothar
--
Lothar Kimmeringer E-Mail: (e-mail address removed)
PGP-encrypted mails preferred (Key-ID: 0x8BC3CD81)

Always remember: The answer is forty-two, there can only be wrong
questions!
 
G

Greg R. Broderick

javax.mail.MessagingException: Could not connect to SMTP host:
ttmsg01, port: 25;
nested exception is:

Looks to me like a configuration issue - make sure you've configured the
correct host name and port number of your SMTP mail server and try again.

Cheers!

--
---------------------------------------------------------------------
Greg R. Broderick (e-mail address removed)

A. Top posters.
Q. What is the most annoying thing on Usenet?
---------------------------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top