diff --git a/servers/PasswordAccountsServer/PasswordAccountsServer.py b/servers/PasswordAccountsServer/PasswordAccountsServer.py index e8363ed9..15242768 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: