• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to turn off JavaMail debug output  RSS feed

 
William Stafford
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using a locally produced sendMail app that works fine but outputs a load of debug info to sysout. I've tried all sorts of things to turn this output off but nothing works.

Any help or guidance would be appreciated,
-=beeky

--- sample of the debug output -----
DEBUG: JavaMail version 1.4.1
DEBUG: not loading file: C:\program files\java\jdk1.6.0_03\jre\lib\javamail.prov
iders
DEBUG: java.io.FileNotFoundException: C:\program files\java\jdk1.6.0_03\jre\lib\
javamail.providers (The system cannot find the file specified)
DEBUG: !anyLoaded
DEBUG: not loading resource: /META-INF/javamail.providers
DEBUG: successfully loaded resource: /META-INF/javamail.default.providers
DEBUG: Tables of loaded providers

... many, many more lines
 
Paul Clapham
Sheriff
Posts: 22374
42
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should look for something which turns that debugging on. Searching the code for instances of the string "debug" would be a good start.

It's also possible that whatever starts the application is setting a system property to turn debugging on. Check that out too.
 
Campbell Ritchie
Sheriff
Posts: 55351
157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Too difficult a question for the beginner's forum. Moving.
 
Carey Evans
Ranch Hand
Posts: 225
Debian Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to the source code for javax.mail.Session and the JavaDoc for its setDebug() method, the debugging flag is set on the session by setting mail.debug to true in the initial session properties, or by calling session.setDebug(true). Something in your code that creates the mail session must be enabling debugging.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!