Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 09-09-2014, 11:29 AM   #1
Registered: Sep 2009
Posts: 83

Rep: Reputation: 1
Prevent System.out using javax.mail

I recently prepared a java class to send email using javax.mail.
It initially printed a great deal of text to System.out.
I added the statement "session.setDebug(false);" which cut the text printed to the console in half but it still prints text I wish to suppress.

The mail part works. Its printing:

DEBUG: JavaMail version 1.4ea

DEBUG: C:\Internet\JavaEE5sdk_copy\jdk\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

DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc], com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc]}

DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]}

DEBUG: successfully loaded resource: /META-INF/

DEBUG: !anyLoaded

DEBUG: not loading resource: /META-INF/

DEBUG: C:\Internet\JavaEE5sdk_copy\jdk\jre\lib\ (The system cannot find the file specified)
Old 09-09-2014, 12:31 PM   #2
Registered: Sep 2009
Posts: 83

Original Poster
Rep: Reputation: 1
Problem solved.

I upgraded to javax.mail.jar 1.5 then set:

props.put("mail.debug", "false");


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
package javax.mail does not exist for centos 6.2 newbie14 Linux - Software 9 05-21-2012 01:04 AM
How to prevent others to access my mail server? kri Linux - Server 3 10-04-2011 03:50 AM
How to prevent sendmail from delivering mail to other systems? CBMcArthur Linux - Server 4 08-05-2007 11:37 AM
how do i prevent a user from sending mail onyangoliech Linux - Software 4 12-15-2006 11:24 AM
prevent user from sending mail in postfix onyangoliech Linux - Networking 1 12-14-2006 07:29 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:44 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration