A Nottingham man banned from contacting his ex-partner after he assaulted her and then wrote a "somewhat sinister" letter to her from prison, was arrested on his release.
Alex Cobb received a suspended prison sentence for harassment and common assault, in December, last year, but breached a restraining order and was jailed for 29 weeks, in April .
He wrote to his ex-partner on July 18, and referred to her "grassing him up" and said that "he knew she did it", said prosecutor Anna Pritchard.
"He said: "I know what you have done. I have had confirmation of that.""
He contacted his ex-partner "constantly through June", Ms Pritchard added.
"She wrote to Nottingham prison to tell them he had contacted her," she said, adding that the five-page letter was not threatening, but "somewhat sinister."
"It's concerning that he continues to breach the order while serving a sentence for breaching the order," she said.
The court heard the order runs until April 23, 2021, and Cobb has six convictions for 17 offences.
"He was released from prison yesterday and arrested at the gate," said Chris Perry, mitigating.
"His judgment was a long way off. The vast majority of the letter is telling her how much he really cares for her and reassuring her that this is the end of things.
"It's unfair to say it's sinister - when you look at the totality of the letter his intentions aren't to cause distress to the complainant.
"He has two children with this person and he hopes to be a better dad."
Cobb, 25, of Farndale Drive, admitted breaching the restraining order and the suspended sentence, when he appeared at Mansfield Magistrates Court, on Wednesday.
He was jailed for 18 weeks, and he was ordered to pay a £122 government surcharge.
For more of the latest cases from Mansfield Magistrates Court click here.