I think you did the right thing.

Did your boss talk to this co-worker yet about the situation? I'm thinking he may get a warning of some kind. He may get a verbal warning or a written warning. Heck, he may even get fired. I like to joke around with my co-workers and we can push it pretty far. But it sounds like that guy went too far and crossed the line.

He has to learn he can't say things like that. It's inappropriate. And the fact he wrote it in an email? He's dumb, for sure.