Rebekah Brooks was a "nightmare" to work with and would send dozens of "extremely unpleasant" emails every day, a journalist has told a court.
Chris Pharo, 45, the head of news at The Sun, is one of six journalists and senior staff at the newspaper on trial over allegations of corrupt payments to officials.
Pharo said Brooks, who was then known as Rebekah Wade, would humiliate him and threaten him with dismissal.
He spoke of receiving up to 25 "ridiculous" and "extremely unpleasant" emails in a morning from his former editor.
The 45-year-old told the court that Brooks sent an email to around 3,500 people in the company complaining that her "idiot news editor" could not find any stories.
He described a meeting where she allegedly became so angry that she repeatedly swore at him before slamming the door so hard that the handle fell off - leaving him and his colleagues stuck inside the room.
He also claimed that she turned down an offer to break the MPs' expenses scandal because she had just paid glamour model Katie Price £250,000 for excerpts of her new book.
"You have to meet Rebekah to understand how incredibly charming she is. When she wants to be," Pharo told Kingston Crown Court .
"She was nothing short of a nightmare on occasions.
"When she was in a difficult or bad mood, which was very often, relatively speaking, I would receive 25 emails of an extremely unpleasant nature about what she had read in other newspapers and not in ours."
Pharo and five others were today cleared of an "overarching" conspiracy with public officials, but the journalists still face charges of conspiring to commit misconduct in a public office.
The trial continues.