Three Ireland and a pizza chain have pleaded guilty to unlawfully sending customers unwanted marketing text messages.

The telecom and internet provider, and Mizzoni's Pizza & Pasta Company were summoned to appear at Dublin District Court after complaints were received by the Data Protection Commission.

They pleaded guilty to breaching the EC electronic communications privacy and electronic communications regulations, an offence that can result in a €5,000 fine with a recorded criminal conviction.

However, Judge Anthony Halpin said he would spare them recorded convictions if they contributed to prosecution costs and donated money to charity.

Prosecuting solicitor Aoife O'Carroll said the DPC was proceeding with two charges and the remaining six could be withdrawn in the case of Three Ireland.

Deputy Data Protection Commissioner Tony Delaney detailed two complaints in phone company's case. He said a woman had called Three Ireland last July to opt out of marketing texts.

There was a delay in implementing her opt out and she got three more promotional messages.

The second customer was upset having repeatedly told the firm he was opting out but the messages kept coming. He complained that he found it difficult to "extricate myself from them".

He received five more and complained to the DPC.

Mr Delaney agreed with defence solicitor David Stafford that Three Ireland had been co-operative and were able to explain how the system errors occurred.

Pleading for leniency, the solicitor said the firm was working on its system and it was hoped there would be no recurrence.

Judge Halpin noted the company had agreed to pay the prosecution costs. He said he would apply the Probation of Offenders Act, sparing the telecom company a conviction, if it donated €400 to the Little Flower Penny Dinner Charity which helps underprivileged people in Dublin city-centre's Liberties area.

The court heard a man complained that he had received an unwanted marketing text from Mizzonis Pizza & Pasta Company in March 2019. It came four years after he had ordered a pizza from one of their restaurants.

He received three more messages with various offers, the court heard.

Mr Delaney said the issue there was that no consent discussion had taken place between him and the firm. Even if he had been asked, consent for marketing messages expires after 12 months and needs to be refreshed to continue.

The pizza firm's solicitor said the firm had been operating at a loss for the past year but has taken steps to deal with the breach.

Judge Halpin accepted the firm had shown remorse and now had an expert monitoring its database to ensure it did not happen again.

It was ordered to pay the DPC's costs of €1,031, and to give €200 to the same charity.

Neither firm had prior convictions.

Both cases were adjourned until March 23 to confirm payment of the costs and charitable donations.