Several thoughts, some reasonable and some probably stupid, split into separate comments so the reasonable parts can be discussed and the stupid parts torn apart separately:
We need to start including some internet human interaction training in high school or elementary school. This should cover two things.
First, it should cover how the person on the other end of an internet interaction is another person, with feelings, and so we should keep that in mind. It should cover how it is easy to forget that, and so say things online we'd never say to someone's face.
Second, since that isn't going to stop the problem, people need to be warned about the jerks who like to harm people for the sake of harming them (see part 1), told that they are likely to encounter such people at some point, and get shit directed at them. They need to be told to not take it personally, the senders are not mentally well, and just filter their messages out.