summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfpeters <>2004-04-19 09:58:01 (GMT)
committerfpeters <>2004-04-19 09:58:01 (GMT)
commite34b6b57cccc739cf51bfb386e7b91aea41c0d59 (patch)
treeb73bd9dc41f137c516c8ff1f763b4d196e6ebd5c
parent8ad008a32fc96a00e8189d0ef18d3127b665425b (diff)
downloadglasnost-e34b6b57cccc739cf51bfb386e7b91aea41c0d59.zip
glasnost-e34b6b57cccc739cf51bfb386e7b91aea41c0d59.tar.gz
glasnost-e34b6b57cccc739cf51bfb386e7b91aea41c0d59.tar.bz2
2 niveaux de fallback pour le message de bienvenue; qui peut être envoyé avec
des accents
-rwxr-xr-xservers/PasswordAccountsServer/PasswordAccountsServer.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/servers/PasswordAccountsServer/PasswordAccountsServer.py b/servers/PasswordAccountsServer/PasswordAccountsServer.py
index e8363ed..1524276 100755
--- a/servers/PasswordAccountsServer/PasswordAccountsServer.py
+++ b/servers/PasswordAccountsServer/PasswordAccountsServer.py
@@ -268,6 +268,10 @@ class PasswordAccountsServer(
messageFileName = commonTools.getConfig(
commonTools.extractDispatcherId(object.id),
'WelcomeEmail-%s' % personLanguage)
+ if not messageFileName:
+ messageFileName = commonTools.getConfig(
+ commonTools.extractDispatcherId(object.id), 'WelcomeEmail')
+
messageSubject = commonTools.getConfig(
commonTools.extractDispatcherId(object.id),
'WelcomeEmailSubject',
@@ -304,6 +308,10 @@ The Glasnost administrator - %(fromAddress)s
mailTo = toAddress,
mailSubject = messageSubject,
mailMessage = message,
+ moreHeaders = {
+ 'Content-Type': 'text/plain; charset=iso-8859-1',
+ 'Content-Transfer-Encoding': '8bit',
+ }
)
@@ -378,6 +386,14 @@ The Glasnost administrator - %(fromAddress)s
def getAdminEmailAddresses(self, stopAsap = 0):
+ # if an address is set in the config file we use it; otherwise we
+ # must grab addresses from self.admin.adminsSet
+ email = commonTools.getConfig(
+ commonTools.extractDispatcherId(context.getVar('dispatcherId')),
+ 'AdminEmailAddress')
+ if email:
+ return [email]
+
virtualServerId = context.getVar('applicationId')
virtualServer = self.getVirtualServer(virtualServerId)
try: