[supervision.py] Ajout d'un champ X-Mailer et encodage du mail en utf-8
This commit is contained in:
parent
9665094ad2
commit
a6eec8d74e
1 changed files with 2 additions and 1 deletions
|
@ -93,6 +93,7 @@ class mail_solde:
|
||||||
mail_template = """From: %(From)s
|
mail_template = """From: %(From)s
|
||||||
To: %(To)s
|
To: %(To)s
|
||||||
Subject: %(Subject)s
|
Subject: %(Subject)s
|
||||||
|
X-Mailer: modif_solde (/usr/scripts/gestion/gen_confs/supervision.py)
|
||||||
|
|
||||||
%(Text)s"""
|
%(Text)s"""
|
||||||
|
|
||||||
|
@ -116,6 +117,6 @@ Subject: %(Subject)s
|
||||||
self.mail_template % { 'From' : self.From,
|
self.mail_template % { 'From' : self.From,
|
||||||
'To' : ','.join(self.To),
|
'To' : ','.join(self.To),
|
||||||
'Subject' : self.Subject,
|
'Subject' : self.Subject,
|
||||||
'Text' : texte.encode('iso8859-15', 'ignore') } )
|
'Text' : texte.encode('utf-8', 'ignore') } )
|
||||||
conn.quit()
|
conn.quit()
|
||||||
print OK
|
print OK
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue