Issue Bug Closed

#49396t3lib_utility_Mail::breakLinesForEmail cuts text wrong and discard rest of line

Thorsten Krieger 06/25/13, 10:11 updated 10/02/18, 12:11

Description

This Line of a text mail for directmail

Mein Link auf eine News (Link: http://zzzzzzzzzzzzz.xxxxxxxxx.de/index.php?id=10&tx_ttnews%5Btt_news%5D=1&cHash=66f5af320da29b7ae1cda49047ca7358)

is cutted to

Mein Link auf eine News (Link: 

The bug ist in method breakLinesForEmail(). The counter $substrStart isn’t incremented correctly.

You have to add this line

$substrStart++;

in this block

if ($spacePos !== FALSE) {
    // take everything up to last space-char
    $theLine = substr($substr, 0, $spacePos);
    $substrStart++;
} else {...}

See here in line 14: http://pastebin.com/3ejHhbfX

Reviews 3