LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 09-09-2014, 12:29 PM   #1
seamore
Member
 
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: java.io.FileNotFoundException: 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/javamail.default.address.map

DEBUG: !anyLoaded

DEBUG: not loading resource: /META-INF/javamail.address.map

DEBUG: java.io.FileNotFoundException: C:\Internet\JavaEE5sdk_copy\jdk\jre\lib\javamail.address.map (The system cannot find the file specified)
 
Old 09-09-2014, 01:31 PM   #2
seamore
Member
 
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");
 
  


Reply


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 02:04 AM
How to prevent others to access my mail server? kri Linux - Server 3 10-04-2011 04:50 AM
How to prevent sendmail from delivering mail to other systems? CBMcArthur Linux - Server 4 08-05-2007 12:37 PM
how do i prevent a user from sending mail onyangoliech Linux - Software 4 12-15-2006 12:24 PM
prevent user from sending mail in postfix onyangoliech Linux - Networking 1 12-14-2006 08:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:02 PM.

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