A man who used his wife's Facebook account to snoop on her has been charged with a criminal offence.

Aaron Timothy Barrett, 26, had recently separated from his wife, who then blocked him on Facebook.

Police said Barrett guessed the password to the woman's Facebook account and unblocked himself on May 13.

Barrett, a forestry worker of Blenheim, accessed her page to see who she had been contacting and changed her password.

The following day, Barrett emailed her and threatened her, police said.

He admitted two charges at the Blenheim District Court on Monday.

The charges were intentionally accessing a computer system without authorisation, and using a telephone device for the purpose of disturbing the recipient, by sending an email with the intention of causing offence.

Barrett's lawyer Phil Watson said his client struggled to accept the end of the relationship.

Barrett was a member of Jehovah's Witnesses, and described the reason for the relationship breakdown as "fornication", Watson said.

He had since sought anger management counselling and had attended mental health services, Watson said.

Judge Chris Tuohy said the email threat counted as family violence as it was classed as psychological abuse.

Barrett had contacted the woman once since charges were laid, breaking the non-contact condition of his bail.

The woman sought a protection order and Judge Tuohy granted it.

"I understand how serious it can be when a serious relationship like marriage breaks down. You have to accept that the relationship ended, if she wants to end it. That's just the way things are, and I hope you can get over it," Judge Tuohy said.

Barrett was convicted and ordered to come up for sentencing if charged with a similar offence.

"The conviction itself can be a serious consequence, particularly for someone with no convictions."