Former News International Chief Executive Rebekah Brooks and 6 others are to find out if they will be charged with perverting the course of justice tomorrow. Ms Brooks, from Chipping Norton in Oxfordshire appeared at the Leveson Inquiry into press standards last week.
David Cameron sent commiserations to Rebekah Brooks after she resigned as News International chief executive over the phone hacking scandal, the Leveson Inquiry heard last week.
Ms Brooks said the indirect messages from the Prime Minister were "along the lines" of "keep your head up" and had also expressed regret that he could not be more loyal in public.
She also received sympathetic messages from other senior figures in 10 and 11 Downing Street, the Home Office, the Foreign Office and some Labour politicians, including Tony Blair.
The glimpse of Ms Brooks's network of high-powered friends and contacts came as she took to the witness box, despite being under investigation by police.
Ms Brooks said she only had access to around six weeks of texts and emails from her time as NI chief executive, from the beginning of June to July 17 last year.
Only one of those emails was relevant to the inquiry, according to her evidence.
One of the text messages had been from Mr Cameron, but the content was compressed and unreadable, she said.
Robert Jay QC, counsel for the inquiry, asked Ms Brooks about reports that she had received sympathetic messages after her resignation last July.
"I had some indirect messages from some politicians but nothing direct," she replied.
"A variety - some Tories a couple of Labour politicians. Very few Labour politicians.
"I received some indirect messages from Number 10, Number 11, the Home Office, the Foreign Office..."
She said Tony Blair had been among them but Gordon Brown had not.
"He was probably getting the bunting out," she added, provoking laughter in the courtroom.
Questioned on whether reports were correct that Mr Cameron's message had urged her to "keep your head up", Ms Brooks responded: "Along those lines."
Pressed on whether the premier had also conveyed regret that political circumstances meant he could not be more "loyal", Ms Brooks replied: "Similar, but very indirect."
After she became editor of the Sun, in which she admitted Rupert Murdoch had a hand, she spoke to the mogul "frequently", Mrs Brooks said.
She revealed that the tycoon "liked X Factor", despite arguing for coverage of serious issues over celebrity, and also quashed a rumour that the pair used to swim together when he was in London.
Mrs Brooks also denied that, after she was arrested in 2005 over an alleged assault on her husband, Mr Murdoch sent a dress to the police station where she was being held. She was later released without charge and the police took no further action.
The inquiry heard that former prime minister Tony Blair attended a surprise party thrown for Mrs Brooks by Mr Murdoch, but she said she could not remember whether Mr Cameron was there, though it was possible he was.
She told the inquiry she met Mr Blair in 1995 after he became leader of the Labour Party, and their meetings became more frequent throughout his decade as premier.
They met formally, informally and socially, and often spoke on the telephone, she said, admitting they became "friendly".
But she said there were no emails or texts because "he did not have a mobile phone or in fact I think use a computer when he was prime minister".
In a written statement she said she became close friends with Mr Blair and his wife, Cherie, as well as his spin doctor Alastair Campbell and his partner, Fiona Millar.