Skip to content
Snippets Groups Projects
Commit caf84064 authored by Jean-Philippe Guérard's avatar Jean-Philippe Guérard
Browse files

Fix last header line size calculation

The "From: " prefix size was not taken into accounts when
calculating how many characters were on the last header line
produced by mb_encode_mimeheader.

This is used to check if the e-mail address should be
placed on a separate line.
parent 87c0dd21
No related branches found
No related tags found
No related merge requests found
......@@ -172,10 +172,10 @@ function sendEmail( $to, $subject, $body, $headers, $param)
$subject = mb_encode_mimeheader( html_entity_decode( $subject, ENT_QUOTES, 'UTF-8' ), "UTF-8", "B", "\n", 9 ) ;
$encoded_app = mb_encode_mimeheader( NOMAPPLICATION, "UTF-8", "B", "\n", 6 ) ;
$size_encoded_app = strlen( $encoded_app ) % 75 ;
$size_encoded_app = ( 6 + strlen( $encoded_app ) ) % 75 ;
$size_admin_email = strlen( ADRESSEMAILADMIN ) ;
if ( $size_encoded_app + $size_admin_email + 9 > 74 ) {
if ( ( $size_encoded_app + $size_admin_email + 9 ) > 74 ) {
$folding = "\n" ;
} else {
$folding = "" ;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment