mail.py: header X-Mailer généralisé
This commit is contained in:
parent
d5e88edc80
commit
7340729fdc
8 changed files with 8 additions and 5 deletions
|
@ -81,15 +81,11 @@ def body(mail, lang1, lang2, mk, params, charset):
|
|||
ret.append(submessage(html.encode(charset), 'html', charset))
|
||||
return ret
|
||||
|
||||
def info(msg):
|
||||
frm = inspect.stack()[1]
|
||||
mod = inspect.getmodule(frm[0])
|
||||
return '[%s] %s' % (mod.__name__, msg)
|
||||
|
||||
def generate(mail, params, lang=default_language, lang_fallback=default_language, lang_alt='en', charset='utf-8'):
|
||||
"""Génère un message multipart"""
|
||||
|
||||
if 'mailer' not in params:
|
||||
# Retrouve le nom du fichire ayant fait l'appel à la fonction
|
||||
frm = inspect.stack()[1]
|
||||
mod = inspect.getmodule(frm[0])
|
||||
params['mailer'] = os.path.abspath(mod.__file__)
|
||||
|
|
1
gestion/mail/template/ago/X-Mailer/fr
Normal file
1
gestion/mail/template/ago/X-Mailer/fr
Normal file
|
@ -0,0 +1 @@
|
|||
{{ mailer }}
|
1
gestion/mail/template/bienvenue/X-Mailer/fr
Normal file
1
gestion/mail/template/bienvenue/X-Mailer/fr
Normal file
|
@ -0,0 +1 @@
|
|||
{{ mailer }}
|
1
gestion/mail/template/carte_etudiant/X-Mailer/fr
Normal file
1
gestion/mail/template/carte_etudiant/X-Mailer/fr
Normal file
|
@ -0,0 +1 @@
|
|||
{{ mailer }}
|
1
gestion/mail/template/demenagement/X-Mailer/fr
Normal file
1
gestion/mail/template/demenagement/X-Mailer/fr
Normal file
|
@ -0,0 +1 @@
|
|||
{{ mailer }}
|
1
gestion/mail/template/reinscription/X-Mailer/fr
Normal file
1
gestion/mail/template/reinscription/X-Mailer/fr
Normal file
|
@ -0,0 +1 @@
|
|||
{{ mailer }}
|
1
gestion/mail/template/upload_hard/X-Mailer/fr
Normal file
1
gestion/mail/template/upload_hard/X-Mailer/fr
Normal file
|
@ -0,0 +1 @@
|
|||
{{ mailer }}
|
1
gestion/mail/template/upload_soft/X-Mailer/fr
Normal file
1
gestion/mail/template/upload_soft/X-Mailer/fr
Normal file
|
@ -0,0 +1 @@
|
|||
{{ mailer }}
|
Loading…
Add table
Add a link
Reference in a new issue