Prime Minister Gordon Brown has apologised for the "smeargate" email affair which targeted members of the Conservative Party.