Ms Green told the court none of the claims in the message were true but they had been sent to members of her family and her two former schools.
She lodged a formal complaint with the Independent Police Complaints Authority after searching on the internet and finding Mr Hampton's name.
"I was really angry with the police, that they could behave in such a disgusting manner, especially when it wasn't true."
Detective Senior Sergeant John van den Heuvel of the cyber crime unit investigated the email.
He said he was immediately suspicious of the message because the Facebook photo was of Assistant Commissioner Rickard, not Mr Hampton. He said the author also got Mr Hampton's rank wrong and misspelt the acronym of Child Youth and Family.
Mr van den Heuvel said while it was obvious to him that it was a hoax, Ms Green treated the email as serious.
He was able to trace the message back to Keesing's home address in Kingsland.
A subsequent police forensic search of Keesing's home computer found traces of the message on his hard drive.
Detective Jacqui Corner said Keesing told her he had sent the message to Ms Green.
She said Keesing believed the woman would "spin out" when she read the message.
Keesing's lawyer, Ikipa Tongatule, said because the message had gone from Keesing's computer to a computer server overseas before arriving at Ms Green's computer, the courts in Auckland did not have jurisdiction to hear the matter.
He said his client never dressed in police uniform and did not visit Ms Green.
Mr Tongatule said the law did not apply to someone pretending to be a police officer while online.
"This court is being asked to treat an image created on a web page to be a person."
Judge Tony Fitzgerald said Keesing's message was sent on behalf of a friend who wanted revenge on Ms Green.
He said it was irrelevant whether the impersonation was online or in person.
Judge Fitzgerald also said he had jurisdiction because the email was sent from a computer in New Zealand and received by Ms Green in New Zealand.
Keesing told the court he had since deleted his Facebook account.