Section 264 of the Criminal Code prohibits criminal harassment of any person such as to cause any reasonable person to fear for their safety or the safety of persons known to them. It can be committed in a number of ways: stalking, repeat communication of any kind, watching a dwelling house or generally acting in a threatening way. The maximum penalty is 10 years imprisonment. Court’s take this charge very seriously and imprisonment is a common penalty for even first time offenders.
A related charge is making communications with the intent to annoy or alarm any person. This can be by letters, phone calls, texts etc.. The maximum punishment is 2 years imprisonment.