openmeetings-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From solo...@apache.org
Subject svn commit: r1451562 - /openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/utils/mail/MailHandler.java
Date Fri, 01 Mar 2013 10:57:31 GMT
Author: solomax
Date: Fri Mar  1 10:57:31 2013
New Revision: 1451562

URL: http://svn.apache.org/r1451562
Log:
[OPENMEETINGS-327] init is removed from the constructor, since called too early

Modified:
    openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/utils/mail/MailHandler.java

Modified: openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/utils/mail/MailHandler.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/utils/mail/MailHandler.java?rev=1451562&r1=1451561&r2=1451562&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/utils/mail/MailHandler.java
(original)
+++ openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/utils/mail/MailHandler.java
Fri Mar  1 10:57:31 2013
@@ -73,10 +73,6 @@ public class MailHandler {
 	private boolean mailTls;
 	private boolean mailAddReplyTo;
 
-	public MailHandler() {
-		init();
-	}
-	
 	private void init() {
 		smtpServer = cfgDao.getConfValue("smtp_server", String.class, null);
 		smtpPort = cfgDao.getConfValue("smtp_port", String.class, "25");
@@ -133,7 +129,9 @@ public class MailHandler {
 	
 	private MimeMessage getBasicMimeMessage() throws Exception {
 		log.debug("getBasicMimeMessage");
-
+		if (smtpServer == null) {
+			init();
+		}
 		Properties props = System.getProperties();
 
 		props.put("mail.smtp.host", smtpServer);



Mime
View raw message