Index: WAeUP_SRP/base/skins/waeup_student/mail2student.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_student/mail2student.py	(revision 2293)
+++ WAeUP_SRP/base/skins/waeup_student/mail2student.py	(revision 2294)
@@ -14,42 +14,45 @@
 mhost = context.MailHost
 prop = context.portal_properties
+REQUEST = context.REQUEST
 
 # the message format, %s will be filled in from data
 
+# message = """
+# From: %s <%s>
+# To: %s
+# Cc: %s
+# Reply-To: %s
+# Subject: %s
+# %s
+# """
+
+#prop.email_from_address should be used for To:
+
+# msg = message % (
+#      co_name,
+#      co_email,
+#      student_email,
+#      co_email,
+#      co_email,
+#      probtype,
+#      commt,
+#      )
+d = {}
+d['co_name'] = co_name
+d['co_email'] = co_email
+d['student_email'] = student_email
+d['probtype'] = probtype
+d['commt'] = commt
+
 message = """
-From: %s <%s>
-To: %s
-Cc: %s
-Reply-To: %s
-Subject: %s
-%s
+From: %(co_name)s <%(co_email)s>
+To: %(student_email)s
+Cc: %(co_email)s
+Reply-To: %(co_email)s
+Subject: %(probtype)s
+%(commt)s
 """
 
-#prop.email_from_address should be used for To:
-REQUEST = context.REQUEST
-
-#url_tuple = REQUEST.HTTP_REFERER.split('?')
-#if len(url_tuple) == 2:
-#    url_tuple[1] ='portal_status_message=Your message has been sent!'
-#else:
-#    url_tuple.append('portal_status_message=Your message has been sent!')
-#redirect_url = "?".join(url_tuple)
-#REQUEST.set('rurl', redirect_url) # to see the result in the error log
-
-msg = message % (
-     co_name,
-     co_email,
-     student_email,
-     co_email,
-     co_email,
-     probtype,
-     commt,
-     )
-mhost.send(msg)
-
-
-#REQUEST = context.REQUEST
-#RESPONSE = REQUEST.RESPONSE
-#RESPONSE.redirect(redirect_url)
+mhost.send(msg % d)
 
 args = {}
