If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

The wordwrap appears to work alright, but the nl2br is dying on you're \r\n.
nl2br is sensitive to both \n and \r\n, so the problem here is you're characters are literal: \\\r\\\n. The question is at which point is this happening.
Check you're database (I assumed db, since you're variable is $DB_rep) using either commandline or phpmyadmin to see if it shows as a newline in the text. If it doesn't, than it was inserted with mysql_real_escape_string, but not with stripslashes in an environment that uses magic_quotes_gpc. If it shows fine, its because you're magic_quotes_runtime is enabled, causing the escaping to happen when queried. Fix by setting set_magic_quotes_runtime(0);.
I find that its more likely from a magic_quotes_gpc environment, which means you'll need to manually edit these (or query to replace them, but there is no automatic fix for it).

PHP Code:

header('HTTP/1.1 420 Enhance Your Calm');

Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)

I noticed that the problem was occurring when I sent a variable
that I had taken from a textarea in a form rather than from the data table.

The datbase retrieved data is fine, so I have solved the problem by reversing the flow. I now save the data and then retriev it before sending the email instead of sending the email and then saving the data.