Changeset 2294


Ignore:
Timestamp:
29 Sep 2007, 18:20:01 (17 years ago)
Author:
joachim
Message:

same

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_student/mail2student.py

    r2293 r2294  
    1414mhost = context.MailHost
    1515prop = context.portal_properties
     16REQUEST = context.REQUEST
    1617
    1718# the message format, %s will be filled in from data
    1819
     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#      )
     40d = {}
     41d['co_name'] = co_name
     42d['co_email'] = co_email
     43d['student_email'] = student_email
     44d['probtype'] = probtype
     45d['commt'] = commt
     46
    1947message = """
    20 From: %s <%s>
    21 To: %s
    22 Cc: %s
    23 Reply-To: %s
    24 Subject: %s
    25 %s
     48From: %(co_name)s <%(co_email)s>
     49To: %(student_email)s
     50Cc: %(co_email)s
     51Reply-To: %(co_email)s
     52Subject: %(probtype)s
     53%(commt)s
    2654"""
    2755
    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)
     56mhost.send(msg % d)
    5457
    5558args = {}
Note: See TracChangeset for help on using the changeset viewer.