A Burnaby B.C., man who criminally harassed his his ex-wife with a vulgar website and a slew of threatening emails was sentenced to nearly four years in prison on Friday.

Patrick Fox, 43, created a site using his ex's name — Desiree Capuano — and labelled her a white supremacist, drug addict and child abuser. The site also contained intimate photos. He also used Google ads to direct internet traffic from workplaces and neighbourhoods near Capuano's home in Arizona to the site.

B.C. Supreme Court Justice Heather Holmes said Fox's harassment was boundless.

"Mr. Fox did everything he could to humiliate and torment Ms. Capuano to the point where she feared reasonably for her and her family's safety," Holmes said Friday.

With time served being taken into account, Fox will spend nearly two years in prison and be on probation for three years after his release.

Thousands of emails

In June, a thick compilation of emails —​ agreed to by both sides as fact — was presented to a jury that eventually found Fox guilty.

In one email, Fox promised to "ruin" Capuano's life and hurt her "emotionally." He also wrote that he would "destroy" her "slowly and incrementally."

"Don't think for one second that anything will ever be more important to me than destroying you. Every moment of my life is focused on one single goal," the message read.

All in all, court heard he sent hundreds of thousands of emails to his ex-wife and people she knew.

Capuano, an IT worker, said she lost her job in 2015 and was told "security risks" caused by the online attacks were part of the reason.

Desiree Capuano told the court she considered suicide after being taunted and harassed by her ex-husband. (CBC)

Landmark case

Fox's was a landmark case in how criminal harassment charges are applied in Canada, as he only attacked his wife online.

The case was also one of the first Canadian attempts to use the charge of criminal harassment to counter online attacks.

Crown prosecutor Mark Myhre said he hopes the sentence sends a message to other potential offenders.

"If you set out to make somebody's life miserable, if you make that your goal in life, you stand a really good chance of going to jail," he said.

Myhre added it was "a huge relief" for Capuano to have the case "taken seriously."

Fox was also sentenced to 10 months in prison for a secondary firearms offence on Friday. His sentences will be served consecutively.