diff options
| author | bwarsaw | 2002-02-11 23:12:56 +0000 |
|---|---|---|
| committer | bwarsaw | 2002-02-11 23:12:56 +0000 |
| commit | 0d31026770bea4a026bf42c1e00a86cfb87cfb5d (patch) | |
| tree | 9093f89c04efc18f231fce244344c9f5a5601e47 | |
| parent | ff6be3d5ef7f34836ddbac8cbd1b571e9ae68281 (diff) | |
| download | mailman-0d31026770bea4a026bf42c1e00a86cfb87cfb5d.tar.gz mailman-0d31026770bea4a026bf42c1e00a86cfb87cfb5d.tar.zst mailman-0d31026770bea4a026bf42c1e00a86cfb87cfb5d.zip | |
ParseMailCommands(): When creating the UserNotification message
object, pass in the language that the message should be in. This
allows us to get the character set and header encodings right.
Patch by Ben Gertzfield, with modifications by Barry.
| -rw-r--r-- | Mailman/MailCommandHandler.py | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/Mailman/MailCommandHandler.py b/Mailman/MailCommandHandler.py index 7d34b3300..1f61617e3 100644 --- a/Mailman/MailCommandHandler.py +++ b/Mailman/MailCommandHandler.py @@ -276,19 +276,16 @@ the list administrator automatically.''')) syslog('error', 'Unexpected Mailman error:\n%s', tbmsg) # and send the traceback to the user + lang = msgdata.get('lang', + self.getMemberLanguage(admin)) responsemsg = Message.UserNotification( admin, admin, _('Unexpected Mailman error'), _('''\ An unexpected Mailman error has occurred in MailCommandHandler.ParseMailCommands(). Here is the traceback: -''') + tbmsg) +''') + tbmsg, lang=lang) responsemsg['X-No-Archive'] = 'yes' - lang = msgdata.get('lang', - self.getMemberLanguage(admin)) - responsemsg['MIME-Version'] = '1.0' - responsemsg.add_header('Content-Type', 'text/plain', - charset=Utils.GetCharSet(lang)) responsemsg.send(self) break # send the response @@ -320,10 +317,7 @@ The following is a detailed description of the problems. responsemsg = Message.UserNotification(msg.get_sender(), self.GetRequestEmail(), subject, - self.__respbuf) - responsemsg['MIME-Version'] = '1.0' - responsemsg.add_header('Content-Type', 'text/plain', - charset=Utils.GetCharSet(lang)) + self.__respbuf, lang) responsemsg.send(self) self.__respbuf = '' self.__errors = 0 |
