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

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 UTC