Daniel John Calladine, 25, of Hardwick Lane, Sutton, admitted harassment by breaching a restraining order on Monday February 1.
Prosecutor Daniel Pietryka read out the text message: ‘You wait until you get decapitated. You chose this.’
He said: “She took this as a serious threat.
“She was very scared on receiving the message.
“When interviewed Calladine told police he couldn’t remember if he had sent the message due to being drunk.
“The text was read out to him and he said it wasn’t something his mother would do.
“He said it was a stupid mistake and he didn’t know why he sent it,” added Mr Pietryka.
The court heard Calladine had been in a three-year relationship with the woman, but he had assaulted her and had been imprisoned.
A two-year restraining order was imposed on Calladine by Nottinghamshire Magistrates Court in September 29 2014.
The court heard that he breached the order in January 2015.
Zahra Hussain, mitigating, said: “He accepts his mother didn’t send the message.
“He was the only other person in the house at the time.
“Since his release he has got his life back on track.”
The court heard he had been working as a fabricator and had recently landed a permanent contract following a period of probation.
Miss Hussain said: “Mr Calladine told me - ‘Had I not been drinking this would not have happened.’
“When asked why he did send it, he said he did not try to threaten her.”
Miss Hussain told the court that Calladine had had no contact with his ex-partner since the first breach of the restraining order in January last year.
Magistrates bailed Calladine to appear at Mansfield Magistrates Court again on February 24.
Pre-sentence reports will be prepared by the probation service before Calladine is sentenced.