From 10b714c517ebb1fd954ef61f6b9c8d9ffb5eefb9 Mon Sep 17 00:00:00 2001
From: srosse <none@none>
Date: Thu, 8 Dec 2011 12:42:21 +0100
Subject: [PATCH] FXOLAT-391: backport mail management

---
 .../org/olat/core/util/mail/MailContext.java  | 43 +++++++++++++++++++
 .../mail/_i18n/LocalStrings_sq.properties     |  2 +-
 .../olat/registration/PwChangeController.java |  4 +-
 3 files changed, 46 insertions(+), 3 deletions(-)
 create mode 100644 src/main/java/org/olat/core/util/mail/MailContext.java

diff --git a/src/main/java/org/olat/core/util/mail/MailContext.java b/src/main/java/org/olat/core/util/mail/MailContext.java
new file mode 100644
index 00000000000..9527d5d0c6b
--- /dev/null
+++ b/src/main/java/org/olat/core/util/mail/MailContext.java
@@ -0,0 +1,43 @@
+/**
+* OLAT - Online Learning and Training<br>
+* http://www.olat.org
+* <p>
+* Licensed under the Apache License, Version 2.0 (the "License"); <br>
+* you may not use this file except in compliance with the License.<br>
+* You may obtain a copy of the License at
+* <p>
+* http://www.apache.org/licenses/LICENSE-2.0
+* <p>
+* Unless required by applicable law or agreed to in writing,<br>
+* software distributed under the License is distributed on an "AS IS" BASIS, <br>
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. <br>
+* See the License for the specific language governing permissions and <br>
+* limitations under the License.
+* <p>
+* Copyright (c) 2008 frentix GmbH, Switzerland<br>
+* <p>
+*/
+
+
+package org.olat.core.util.mail;
+
+import org.olat.core.id.OLATResourceable;
+
+/**
+ * 
+ * Description:<br>
+ * TODO: srosse Class Description for MailContext
+ * 
+ * <P>
+ * Initial Date:  30 mars 2011 <br>
+ * @author srosse, stephane.rosse@frentix.com, http://www.frentix
+ */
+public interface MailContext {
+	
+	public OLATResourceable getOLATResourceable();
+	
+	public String getResSubPath();
+	
+	public String getBusinessPath();
+
+}
diff --git a/src/main/java/org/olat/core/util/mail/_i18n/LocalStrings_sq.properties b/src/main/java/org/olat/core/util/mail/_i18n/LocalStrings_sq.properties
index db6b4952d34..fea9b175fde 100644
--- a/src/main/java/org/olat/core/util/mail/_i18n/LocalStrings_sq.properties
+++ b/src/main/java/org/olat/core/util/mail/_i18n/LocalStrings_sq.properties
@@ -1,6 +1,6 @@
 #Mon Mar 02 09:54:11 CET 2009
 footer.no.userdata=\n\n--- \nKy mesazh \u00EBsht\u00EB d\u00EBrguar automatikisht p\u00EBrmes OLAT-it.\n{0}
-footer.with.userdata=\n\n--- \n{0} {1} ({2})\n{3}\n\nKy mesazh \u00EBsht\u00EB d\u00EBrguar p\u00EBrmes OLAT-it.\n{4}
+footer.with.userdata=\n\n--- \n{2} {3} ({0})\n{4}\n\nKy mesazh \u00EBsht\u00EB d\u00EBrguar p\u00EBrmes OLAT-it.\n{1}
 help.hover.mail-templ=Ndihma p\u00EBr shfryt\u00EBzimin e maketave t\u00EB post\u00EBs
 mailhelper.error.attachment=Posta nuk mund t\u00EB d\u00EBrgohet\: bashk\u00EBngjitje e pavlefshme. Ju lutemi njoftoji pranuesit manualisht.
 mailhelper.error.failedusers=Posta nuk mund t\u00EB d\u00EBrgohet personat n\u00EB vijim.Ju lutemi njoftoji ata manualisht dhe kontrollo adresat e tyre postare. 
diff --git a/src/main/java/org/olat/registration/PwChangeController.java b/src/main/java/org/olat/registration/PwChangeController.java
index 7fd0abed2ee..a16b6a087f3 100644
--- a/src/main/java/org/olat/registration/PwChangeController.java
+++ b/src/main/java/org/olat/registration/PwChangeController.java
@@ -219,8 +219,8 @@ public class PwChangeController extends BasicController {
 							// nothing to do
 						}
 					};
-						
-					MailerResult result = MailerWithTemplate.getInstance().sendMail(identity, null, null, mailTempl, null);
+					//fxdiff VCRP-16: intern mail system
+					MailerResult result = MailerWithTemplate.getInstance().sendRealMail(identity, mailTempl);
 					if(result.getReturnCode() == 0) {
 						getWindowControl().setInfo(translate("email.sent"));
 						// prepare next step
-- 
GitLab