Changeset 2294
- Timestamp:
- 29 Sep 2007, 18:20:01 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/skins/waeup_student/mail2student.py
r2293 r2294 14 14 mhost = context.MailHost 15 15 prop = context.portal_properties 16 REQUEST = context.REQUEST 16 17 17 18 # the message format, %s will be filled in from data 18 19 20 # message = """ 21 # From: %s <%s> 22 # To: %s 23 # Cc: %s 24 # Reply-To: %s 25 # Subject: %s 26 # %s 27 # """ 28 29 #prop.email_from_address should be used for To: 30 31 # msg = message % ( 32 # co_name, 33 # co_email, 34 # student_email, 35 # co_email, 36 # co_email, 37 # probtype, 38 # commt, 39 # ) 40 d = {} 41 d['co_name'] = co_name 42 d['co_email'] = co_email 43 d['student_email'] = student_email 44 d['probtype'] = probtype 45 d['commt'] = commt 46 19 47 message = """ 20 From: % s <%s>21 To: % s22 Cc: % s23 Reply-To: % s24 Subject: % s25 % s48 From: %(co_name)s <%(co_email)s> 49 To: %(student_email)s 50 Cc: %(co_email)s 51 Reply-To: %(co_email)s 52 Subject: %(probtype)s 53 %(commt)s 26 54 """ 27 55 28 #prop.email_from_address should be used for To: 29 REQUEST = context.REQUEST 30 31 #url_tuple = REQUEST.HTTP_REFERER.split('?') 32 #if len(url_tuple) == 2: 33 # url_tuple[1] ='portal_status_message=Your message has been sent!' 34 #else: 35 # url_tuple.append('portal_status_message=Your message has been sent!') 36 #redirect_url = "?".join(url_tuple) 37 #REQUEST.set('rurl', redirect_url) # to see the result in the error log 38 39 msg = message % ( 40 co_name, 41 co_email, 42 student_email, 43 co_email, 44 co_email, 45 probtype, 46 commt, 47 ) 48 mhost.send(msg) 49 50 51 #REQUEST = context.REQUEST 52 #RESPONSE = REQUEST.RESPONSE 53 #RESPONSE.redirect(redirect_url) 56 mhost.send(msg % d) 54 57 55 58 args = {}
Note: See TracChangeset for help on using the changeset viewer.