Even though I don't know the specifics, I take issue with the very idea that merely contacting someone can constitute harassment. At the very least, the content of the message should be taken into account. Intent, more than raw actions taken out of context, is what determines wrongdoing.
Note that I'm not suggesting that the actual law is being misinterpreted. I'm merely stating my personal views about the existence of such a law.