Sun Whitehall editor Clodagh Hartley told a court yesterday she will not be returning to work as a journalist.
Hartley, 40, is accused of arranging payments of £17,475 to HMRC press officer Jonathan Hall over more than three years in exchange for stories.
She said that she did not know what she was doing was illegal – and told a court: "I thought that sources would be protected."
Hartley said that she was "out of the loop" when Sun journalists began to be arrested because she was organising her wedding in Ireland.
"It was a devastating piece of news," she told the Old Bailey.
Alexandra Healy QC, for Hartley, asked: "Did you understand about why police were arresting journalists at that stage?"
The journalist responded: "I began to understand that they were looking at sources who had been paid by papers.
"I think that there had been some earlier arrests regarding police, police sources and I learned then that that was not allowed.
"I did not know at the time that it was illegal to pay police officers, soldiers. I didn't know. I have learned from these events."
Hartley said she now knows "it was being said that it was illegal to pay public officials". Her barrister pointed out that paying public officials was not illegal per se, as the trial indictment shows.
"I thought that sources would be protected," Hartley said of News International's decision to hand over internal data to the police. "That was the journalist's duty."
Healy asked: "Did you have any idea that it could be suggested that what you were doing was criminal?"
Crying, Hartley replied: "I had no idea, no idea it could be criminal."
Her barrister asked: "Whatever the outcome of these proceedings, do you propose to return to journalism?"
Hartley said: "No."
Yesterday in court, Healy inspected each of Hartley's Sun articles said to contain confidential or restricted information.
The journalist defended her work, claiming it was in the public interest, exposing waste and inefficiency in government.
The reporter was also asked about a series of texts with Daily Mail political editor James Chapman in February 2011.
Asked why she appeared to be feeding a rival newspaper a story provided by Hall, Hartley explained she was on maternity leave and felt little loyalty to The Sun after her poor treatment by a senior colleague, who cannot be named.
She had earlier told the court how the colleague had "bullied and harassed" her as well as giving her an unfairly poor appraisal.
"By now… my appeal of my appraisal was very quickly knocked back and I had spent the intervening weeks writing memo after memo and dealing with it," she told the court.
"It had been revealed to my that [the senior colleague] had said I would not be returning to that [Whitehall] job."
She also said that this colleague "had succeeded in stealing contacts from me on two occasions," the court heard.
Both Hartley, of Brockley, south-east London, and Marta Bukarewicz, of Kentish Town, North London – who is accused of agreeing to receive payments on behalf of her boyfriend, Hall – deny conspiracy to commit misconduct in public office.
Hall has accepted he supplied stories for which he was paid.
The trial has adjourned until Monday afternoon when Hartley will be cross-examined.
Email pged@pressgazette.co.uk to point out mistakes, provide story tips or send in a letter for publication on our "Letters Page" blog