in reply to email not line breaking properly

As sulfericacid was trying to say, don't use a double-backslash for "\n":
$ourmessage =~ s/<br>/\n/g; # replace <br> with new-line