From 7340729fdc672678250a24acb74110d3104a49bb Mon Sep 17 00:00:00 2001 From: Daniel STAN Date: Tue, 12 Aug 2014 19:16:09 +0200 Subject: [PATCH] =?UTF-8?q?mail.py:=20header=20X-Mailer=20g=C3=A9n=C3=A9ra?= =?UTF-8?q?lis=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gestion/mail/mail.py | 6 +----- gestion/mail/template/ago/X-Mailer/fr | 1 + gestion/mail/template/bienvenue/X-Mailer/fr | 1 + gestion/mail/template/carte_etudiant/X-Mailer/fr | 1 + gestion/mail/template/demenagement/X-Mailer/fr | 1 + gestion/mail/template/reinscription/X-Mailer/fr | 1 + gestion/mail/template/upload_hard/X-Mailer/fr | 1 + gestion/mail/template/upload_soft/X-Mailer/fr | 1 + 8 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 gestion/mail/template/ago/X-Mailer/fr create mode 100644 gestion/mail/template/bienvenue/X-Mailer/fr create mode 100644 gestion/mail/template/carte_etudiant/X-Mailer/fr create mode 100644 gestion/mail/template/demenagement/X-Mailer/fr create mode 100644 gestion/mail/template/reinscription/X-Mailer/fr create mode 100644 gestion/mail/template/upload_hard/X-Mailer/fr create mode 100644 gestion/mail/template/upload_soft/X-Mailer/fr diff --git a/gestion/mail/mail.py b/gestion/mail/mail.py index 5c48d9b0..2a9d400e 100644 --- a/gestion/mail/mail.py +++ b/gestion/mail/mail.py @@ -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__) diff --git a/gestion/mail/template/ago/X-Mailer/fr b/gestion/mail/template/ago/X-Mailer/fr new file mode 100644 index 00000000..f5d9c869 --- /dev/null +++ b/gestion/mail/template/ago/X-Mailer/fr @@ -0,0 +1 @@ +{{ mailer }} diff --git a/gestion/mail/template/bienvenue/X-Mailer/fr b/gestion/mail/template/bienvenue/X-Mailer/fr new file mode 100644 index 00000000..f5d9c869 --- /dev/null +++ b/gestion/mail/template/bienvenue/X-Mailer/fr @@ -0,0 +1 @@ +{{ mailer }} diff --git a/gestion/mail/template/carte_etudiant/X-Mailer/fr b/gestion/mail/template/carte_etudiant/X-Mailer/fr new file mode 100644 index 00000000..f5d9c869 --- /dev/null +++ b/gestion/mail/template/carte_etudiant/X-Mailer/fr @@ -0,0 +1 @@ +{{ mailer }} diff --git a/gestion/mail/template/demenagement/X-Mailer/fr b/gestion/mail/template/demenagement/X-Mailer/fr new file mode 100644 index 00000000..f5d9c869 --- /dev/null +++ b/gestion/mail/template/demenagement/X-Mailer/fr @@ -0,0 +1 @@ +{{ mailer }} diff --git a/gestion/mail/template/reinscription/X-Mailer/fr b/gestion/mail/template/reinscription/X-Mailer/fr new file mode 100644 index 00000000..f5d9c869 --- /dev/null +++ b/gestion/mail/template/reinscription/X-Mailer/fr @@ -0,0 +1 @@ +{{ mailer }} diff --git a/gestion/mail/template/upload_hard/X-Mailer/fr b/gestion/mail/template/upload_hard/X-Mailer/fr new file mode 100644 index 00000000..f5d9c869 --- /dev/null +++ b/gestion/mail/template/upload_hard/X-Mailer/fr @@ -0,0 +1 @@ +{{ mailer }} diff --git a/gestion/mail/template/upload_soft/X-Mailer/fr b/gestion/mail/template/upload_soft/X-Mailer/fr new file mode 100644 index 00000000..f5d9c869 --- /dev/null +++ b/gestion/mail/template/upload_soft/X-Mailer/fr @@ -0,0 +1 @@ +{{ mailer }}