Stuart Gibbs was found hiding in a shed behind a house in Leicester when a woman reported two men acting suspiciously in a neighbour's garden.
When the police checked his phone, they found the incriminating text in his sent items from earlier that day.
The 24-year-old admitted attempted burglary at Leicester Crown Court, as well as various other offences including dangerous driving, handling stolen goods and possessing cannabis.
James Varley, defending Gibbs, said: "He can't explain the text message and it doesn't reflect the situation or his antecedent history."
Read more: Wife from hell gets five year ASBO for nagging
Read more: Brussels sprouts put man in hospital