An abusive man threatened to kill his former girlfriend unless she got back together with him.
William Murray was jailed after sending a string of threatening messages to the woman and her partner.
Dundee Sheriff Court heard that Murray and the woman had been in a relationship for two and a half years but it ended in January.
The woman was woken in the early hours of the morning by messages from Murray, the court was told.
He said: “I am sorry. I can’t deal with this. I don’t want to hear you talking, I want you to listen to me.
“I am going to kill myself. I’ve got the cord in my bathroom.
“I’m going to kill myself if we do not get back together.”
She told him the relationship was over but Murray responded: “Liar, I’ll kill you and your dafty wee boyfriend.
“I’m paying £20 for screenshots with your information.”
Murray was later traced by police and he gave a “no comment” interview to officers.
The 32-year-old, of Ballindean Road, pleaded guilty to sending offensive communications to the woman on March 3.
Solicitor David Duncan said Murray now recognises that the relationship is over.
Murray was jailed for 115 days by Sheriff John Rafferty.
A non-harassment order was also granted keeping him away from the woman for nine months.