From 12a07f14071ea155526298bb264aef7ed9ec78d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Philippe=20Gu=C3=A9rard?= Date: Wed, 18 Jan 2012 00:29:57 +0100 Subject: [PATCH] Fix the mb_encode_mimeheader call syntax --- fonctions.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fonctions.php b/fonctions.php index b5b4819..e07405f 100644 --- a/fonctions.php +++ b/fonctions.php @@ -167,20 +167,20 @@ function validateEmail($email) function sendEmail( $to, $subject, $body, $headers, $param) { - $subject = mb_encode_mimeheader( html_entity_decode( $subject, ENT_QUOTES, 'UTF-8' ), "UTF-8",,, 9 ) ; + $subject = mb_encode_mimeheader( html_entity_decode( $subject, ENT_QUOTES, 'UTF-8' ), "UTF-8", "B", "\r\n", 9 ) ; - $encoded_app = mb_encode_mimeheader( NOMAPPLICATION, "UTF-8",,, 6 ) ; + $encoded_app = mb_encode_mimeheader( NOMAPPLICATION, "UTF-8", "B", "\r\n", 6 ) ; $size_encoded_app = strlen( $encoded_app ) % 76 ; $size_admin_email = strlen( ADRESSEMAILADMIN ) ; - if ( $size_encoded_app + $size_admin_email + 9 > 74 ) $folding = "\n" + if ( $size_encoded_app + $size_admin_email + 9 > 74 ) $folding = "\r\n" else $folding = "" ; $from = sprintf( "From: %s%s <%s>\n", $encoded_app, $folding, ADRESSEMAILADMIN ) ; - if ( $headers ) $headers .= "\n" ; + if ( $headers ) $headers .= "\r\n" ; $headers .= $from ; - $headers .= "MIME-Version: 1.0\n" ; - $headers .= "Content-Type: text/plain; charset=UTF-8\n" ; + $headers .= "MIME-Version: 1.0\r\n" ; + $headers .= "Content-Type: text/plain; charset=UTF-8\r\n" ; $headers .= "Content-Transfer-Encoding: 8bit" ; $body = html_entity_decode( $body, ENT_QUOTES, 'UTF-8' ) ;