Gordon Ramsay has received an apology from former News of the World editor Phil Hall. Photograph: Lionel Hahn/PA

Former News of the World editor Phil Hall has apologised to Gordon Ramsay for passing on information about the chef which he admitted may have been obtained by "illegitimate means".

Hall, founder of PR agency Phil Hall Associates (PHA), issued the public apology on Thursday after settling out of court with Ramsay and agreeing to make a donation to a charity of Ramsay's choice.

The information sold by Hall to the Daily Mail concerned a shark-fishing trip attended by Ramsay shortly before he appeared in a TV programme criticising the trade, the high court was told.

In the apology he admits that he should not have passed on personal family pictures and medical information provided by the chef's former business partner and father-in-law, Christopher Hutcheson.

Hall's lawyers said that the PR man did not know that any emails had been unlawfully intercepted. A spokesman said that Hall "absolutely" did not know the provenance of the emails and that Hutcheson is now no longer a client of PHA.

"In late 2010 and early 2011, I was engaged by Chris Hutcheson (Mr Ramsay's father-in-law) and asked to pass certain stories to the newspapers regarding Gordon Ramsay. In particular, Mr Hutcheson provided me with private information about the Ramsays, including personal family pictures and medical information," Hall said.

"I accept that, given the public breakdown of the relationship between Mr Hutcheson and Mr Ramsay, of which I was fully aware at the time, I should have guessed that Mr Hutcheson was not entitled to this information and in all likelihood may have come by it via illegitimate means.

"I would like to offer Gordon, Tana and their family a full and unreserved apology for my actions and any distress caused, and, at Mr Ramsay's request, I have made a donation to a charity of his choice."

It had emerged during a previous legal battle between Ramsay and Hutcheson that the chef's former father-in-law had unlawfully accessed his emails. The dispute was eventually settled with Ramsay paying Hutcheson £2m to buy him out of the chef's catering empire earlier this year.

At a high court hearing earlier this month Ramsay's lawyers claimed that Hall had conspired with Hutcheson to publish personal information about the chef while the dispute was ongoing. This was denied by Hall and the hearing was due to resume on Thursday, but was settled the previous night.

Ramsay has selected Scottish Spina Bifida as the recipient of the charity money. The amount involved was undisclosed.

Hall was the editor of the News of the World between 1995 and 2000.

• To contact the MediaGuardian news desk email editor@mediatheguardian.com or phone 020 3353 3857. For all other inquiries please call the main Guardian switchboard on 020 3353 2000. If you are writing a comment for publication, please mark clearly "for publication".

• To get the latest media news to your desktop or mobile, follow MediaGuardian on Twitter and Facebook