Changeset 2293


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

better string formatting please test

Location:
WAeUP_SRP/base/skins
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_default/mail2admin.py

    r2271 r2293  
    1515# the message format, %s will be filled in from data
    1616
     17# message = """
     18# From: %s <%s>
     19# To: %s
     20# Cc: %s
     21# Bcc: %s
     22# Reply-To: %s
     23# Subject: Uniben Contact
     24
     25# Fullname: %s
     26# Member ID: %s
     27# Problem Type: %s
     28# Description: %s
     29# """
     30# msg = message % (
     31#      fullname,
     32#      email,
     33#      prop.email_from_address,
     34#      email,
     35#      'henrik@waeup.org',
     36# #    'js@aixtraware.de',
     37#      email,
     38#      fullname,
     39#      regno,
     40#      probtype,
     41#      descr,
     42#      )
     43d = {}
     44d['fullname'] = fullname
     45d['email'] = email
     46d['email_from'] = prop.email_from_address
     47d['regno'] = regno
     48d['probtype'] = probtype
     49d['descr'] = descr
     50
    1751message = """
    18 From: %s <%s>
    19 To: %s
    20 Cc: %s, %s
    21 Bcc: %s
    22 Reply-To: %s
     52From: %(fullname)s <%(email)s>
     53To: %(email_from)s
     54Cc: %(email)s
     55Bcc: 'henrik@waeup.org'
     56Reply-To: %(email)s
    2357Subject: Uniben Contact
    2458
    25 Fullname: %s
    26 Member ID: %s
    27 Problem Type: %s
    28 Description: %s
     59Fullname: %(fullname)s
     60Member ID: %(regno)s
     61Problem Type: %(probtype)s
     62Description: %(descr)s
    2963"""
    3064
    3165#prop.email_from_address should be used for To:
    3266
    33 msg = message % (
    34      fullname,
    35      email,
    36      prop.email_from_address,
    37      email,
    38      'henrik@waeup.org',
    39 #    'js@aixtraware.de',
    40      email,
    41      fullname,
    42      regno,
    43      probtype,
    44      descr,
    45      )
    46 mhost.send(msg)
     67mhost.send(msg % d)
    4768
    4869REQUEST = context.REQUEST
  • WAeUP_SRP/base/skins/waeup_student/mail2student.py

    r2261 r2293  
    2121To: %s
    2222Cc: %s
    23 Bcc: %s
    2423Reply-To: %s
    2524Subject: %s
Note: See TracChangeset for help on using the changeset viewer.