W3C home > Mailing lists > Public > www-validator-cvs@w3.org > September 2009

2006/unicorn/src/org/w3c/unicorn/output MailOutputModule.java,1.5,1.6

From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
Date: Wed, 23 Sep 2009 15:40:36 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1MqTxM-0006dy-2W@lionel-hutz.w3.org>
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/output
In directory hutz:/tmp/cvs-serv25493/src/org/w3c/unicorn/output

Modified Files:
	MailOutputModule.java 
Log Message:
added unicorn.mail.debug in mail.properties to activate/desactivate debugging of javamail

Index: MailOutputModule.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/output/MailOutputModule.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- MailOutputModule.java	23 Sep 2009 14:09:52 -0000	1.5
+++ MailOutputModule.java	23 Sep 2009 15:40:34 -0000	1.6
@@ -67,7 +67,12 @@
 			Properties mailProps = Property.getProps("mail.properties");
 			Authenticator auth = new UnicornAuthenticator(mailProps.getProperty("unicorn.mail.username"), mailProps.getProperty("unicorn.mail.password"));
 			Session session = Session.getDefaultInstance(mailProps, auth);
-		    session.setDebug(true);
+		    
+			boolean debug = false;
+			if ("true".equals(mailProps.getProperty("unicorn.mail.debug")))
+				debug = true;
+			
+			session.setDebug(debug);
 		    Message msg = new MimeMessage(session);
 		    
 		    InternetAddress addressFrom = new InternetAddress(mailProps.getProperty("unicorn.mail.from"), "Unicorn");
Received on Wednesday, 23 September 2009 15:40:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:55:14 GMT