A drug user was exposed as a dealer through tell-tale texts found on his mobile phone.
Messages sent to and from Frederick Gray revealed he had been peddling heroin and cannabis to customers from his home.
Newcastle Crown Court heard the 46-year-old's phones were seized when police raided his house at Mountbatten Avenue, Hebburn, in December 2015 with a drugs warrant.
Officers recovered a small haul of heroin, cannabis, diazepam and methadone as well as a "debtors list", dealer bags and £480 in cash.
Prosecutor Kevin Wardlaw told the court: "The amount of controlled drugs was small but what gave rise to the charges was the interrogation of mobile telephones seized.
"There were a number of text messages.
"The text messages indicated he was involved in drug dealing, dealing drugs for financial gain."
The court heard the texts showed some customers asking for drugs using the slang term "kentucky", meaning they wanted them on credit.
Mr Wardlaw said the texts, most of which referred to the supply of cannabis, included Gray asking customers if they were "squaring up" their bills.
He added: "There are texts dealing with supply of heroin."
Gray admitted possessing heroin and cannabis with intent to supply and possession of methadone and diazepam.
He pleaded guilty on the basis he had been drug free for a number of years but, after meeting a new girlfriend with a habit, he began misusing again and built up a debt.
The court heard since the offences, Gray has weaned himself back off drugs, moved in with his mum and step-dad, who are both in poor health and is a registered carer for them both.
Judge Tim Gittins told him: "Your mobile phone revealed texts that indicated that you had been selling for a period of about a month or so, to a small group of friends, people you knew were users, to fund your own addiction and attempt to get yourself out of a debt to other dealers, your own dealers, that you had built up because of your addiction."
Judge Gittins sentenced Gray to two years imprisonment, suspended for two years, with rehabilitation requirements, 150 hours unpaid work and a three month curfew.
The judge warned Gray he would be no help to his mum and step-dad if he turned back to drugs and said: "You are a crutch upon which they rely to get through their day to day existence."
Rachel Hedworth, defending, said Gray was selling, mostly cannabis, to fund his own habit and made no extra money through drug dealing.
Miss Hedworth said a prison sentence would have a "catastrophic" effect on those who rely on Gray for day to day help.