From d74b6a62007408a7456f9ea2c0000cccb570647f Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Tue, 17 Apr 2012 16:03:14 +0200 Subject: [PATCH] LSformElement::password : Added mail headers parameters --- .../LSattribute/LSattr_html/LSattr_html_password.docbook | 9 +++++++++ .../includes/class/class.LSformElement_password.php | 9 ++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/doc/conf/LSattribute/LSattr_html/LSattr_html_password.docbook b/doc/conf/LSattribute/LSattr_html/LSattr_html_password.docbook index 07627ed5..c9904415 100644 --- a/doc/conf/LSattribute/LSattr_html/LSattr_html_password.docbook +++ b/doc/conf/LSattribute/LSattr_html/LSattr_html_password.docbook @@ -164,6 +164,15 @@ l'attribut. + + + headers + + Un tableau de type clé/valeur ou la clé est le nom d'un header + à ajouter au mail et la valeur est la valeur de l'header en question. + + + diff --git a/public_html/includes/class/class.LSformElement_password.php b/public_html/includes/class/class.LSformElement_password.php index c74d2ed0..30d6eb53 100644 --- a/public_html/includes/class/class.LSformElement_password.php +++ b/public_html/includes/class/class.LSformElement_password.php @@ -210,10 +210,17 @@ class LSformElement_password extends LSformElement { if (checkEmail($mail,NULL,true)) { $this -> attr_html -> attribute -> ldapObject -> registerOtherValue('password',$this -> sendMail['pwd']); $msg = $this -> attr_html -> attribute -> ldapObject -> getFData($this -> sendMail['msg']); + if (isset($this -> params['html_options']['mail']['headers'])) { + $headers = $this -> params['html_options']['mail']['headers']; + } + else { + $headers = array(); + } if (sendMail( $mail, $this -> sendMail['subject'], - $msg + $msg, + $headers )) { LSsession :: addInfo(_('Notice mail sent.')); }