That won't work, because that will simply remove EVERY line break. Which I don't want to do.
The solution I've found is this. First, normalize the types of line breaks:
$body = ereg_replace("\r\n", "\n", $returndata);
$body = ereg_replace("\r", "\n", $returndata);
Then, put a text placeholder where there is a sequence of two linebreaks in a row:
$body = ereg_replace("\n\n", "foobar-doublespace-t1nman33", $returndata);
Next, remove all line breaks:
$body = ereg_replace("\n", " ", $returndata);
Finally, replace the text placeholder with a double linebreak wherever a paragraph should be:
$body = ereg_replace("foobar-doublespace-t1nman33", "\n\n", $returndata);