diff data/plugin/action/submitemail.py @ 628:819c4121f9a0

FormCreate/FormSubmit: change to LF-only line endings
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 25 Mar 2013 19:48:31 +0100
parents f64779d5d500
children
line wrap: on
line diff
--- a/data/plugin/action/submitemail.py	Mon Mar 25 19:41:11 2013 +0100
+++ b/data/plugin/action/submitemail.py	Mon Mar 25 19:48:31 2013 +0100
@@ -1,47 +1,47 @@
-# -*- coding: iso-8859-1 -*-
-"""
-    MoinMoin - submitemail Action
-    
-    Send submited data email address specified in targetemail CGI parameter
-
-    @copyright: 2008 by Peter Bodi <petrdll@centrum.sk>
-    @license: GNU GPL, see COPYING for details.
-"""
-
-from MoinMoin import wikiutil
-from MoinMoin.action import ActionBase
-from MoinMoin.Page import Page
-from MoinMoin.mail.sendmail import sendmail
-
-from submitbase import SubmitBase
-
-
-def execute(pagename, request):
-    submitemail(pagename, request).render()
-
-
-class submitemail(SubmitBase):          
-    
-    def __init__(self, pagename, request):
-        SubmitBase.__init__(self, pagename, request)
-        
-        self.subject = "MoinMoin mail"
-        self.targetemail = request.form.get("targetemail", "")
-        
-    def build_content(self):
-        """ Builds simple 'label: value' string """
-        text = ""
-        for label in self.labels:
-            index = self.labels.index(label)
-            label = label.decode('utf-8')
-            value = self.values[index]
-            text += "%(label)s: %(value)s \n" % {'label': label, 'value': value}
-        return text
-        
-    def submit(self):
-        SubmitBase.submit(self)   
-        text = self.build_content()
-        status, msg = sendmail(self.request, self.targetemail, self.subject, text, mail_from=self.targetemail)
-        self.msg = self._(msg)
-        if status != 1:
-            raise Exception(self.msg)
+# -*- coding: iso-8859-1 -*-
+"""
+    MoinMoin - submitemail Action
+    
+    Send submited data email address specified in targetemail CGI parameter
+
+    @copyright: 2008 by Peter Bodi <petrdll@centrum.sk>
+    @license: GNU GPL, see COPYING for details.
+"""
+
+from MoinMoin import wikiutil
+from MoinMoin.action import ActionBase
+from MoinMoin.Page import Page
+from MoinMoin.mail.sendmail import sendmail
+
+from submitbase import SubmitBase
+
+
+def execute(pagename, request):
+    submitemail(pagename, request).render()
+
+
+class submitemail(SubmitBase):          
+    
+    def __init__(self, pagename, request):
+        SubmitBase.__init__(self, pagename, request)
+        
+        self.subject = "MoinMoin mail"
+        self.targetemail = request.form.get("targetemail", "")
+        
+    def build_content(self):
+        """ Builds simple 'label: value' string """
+        text = ""
+        for label in self.labels:
+            index = self.labels.index(label)
+            label = label.decode('utf-8')
+            value = self.values[index]
+            text += "%(label)s: %(value)s \n" % {'label': label, 'value': value}
+        return text
+        
+    def submit(self):
+        SubmitBase.submit(self)   
+        text = self.build_content()
+        status, msg = sendmail(self.request, self.targetemail, self.subject, text, mail_from=self.targetemail)
+        self.msg = self._(msg)
+        if status != 1:
+            raise Exception(self.msg)