• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

JavaMAIL Configuration Error

 
Ranch Hand
Posts: 129
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to use JavaMAIL but unable to send mail: I need help!

Below I am put the entire code:


META-INF/context.xml





WEB-INF/web.xml




MailSessionListener.java



SomeServlet.java



It shows the Error...
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That looks like the mail server was not listening on the address you used.

If this was my problem I would get my mail sending code running outside the servlet environment in some sort of stand-alone test configuration first.

There are so many things which can go wrong - I would start with the core mail sending code.

Bill
 
ramnna jain
Ranch Hand
Posts: 129
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks William... but I tried the same by creating Session.getInstance(Prop,Auth) and it was a successful attempt... below I am mentioning the code:


MailAuthenticator.java




LoginRegisterAuthenticateImpl.java




Perhaps the problem is with the configuration settings in context.xml. I don't know how to fix.
 
ramnna jain
Ranch Hand
Posts: 129
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to know how to configure Resource tag in context.xml ....


or what else should be done to send mail .... configuring it in the context.
 
ramnna jain
Ranch Hand
Posts: 129
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried few changes in my resources attributes now I am getting new Error:








I think the user is not getting authenticated.
Is there any buddy can help me to resolve the problem...?
reply
    Bookmark Topic Watch Topic
  • New Topic