A director of finance who lived in Dunmow stole £2.1million over 15 years from his employer to fund a luxury lifestyle was jailed for 4 years.

Michael Canning, 50, earning £65,000 a year, stole the money from specialist coffee equipment supplier Mulmar Foodservice Solutions in Hatfield, Herts.

A colleague spotted discrepancies with invoices earlier this year and alerted the authorities.

Canning, a married father of two sons, splashed the money on holidays, clothes, gambling, meals out, school fees, family expenses - and £84,000 on dating sites such as the hacked Ashley Madison and “cam girls”.

Now Canning,whose 24-year marriage has ended and is homeless, is beginning a four year jail sentence.

St Albans Crown Court heard he is so wracked with guilt he is severely depressed and has tried to commit suicide many times - even on the morning before he appeared in the docks.

Canning, an in-patient at a psychiatric unit soon after his arrest in February, who previously lived in Willow Road, Great Dunmow, Essex, pleaded guilty to three offences.

He admitted one charge of false accounting between 2 July 2001 and 1 February 2016 by duplicating legitimate invoices raised to Trendaset Ltd plc, trading as Mulmar Foodservices.

One of obtaining £697,173 in money transfers by deception between July 2001 and January 2007.

And one offence of fraud between January 2007 and February 2016 in falsely representing that he was entitled to £2,173,710 in settlement of invoices to be paid into his own bank accounts.

Judge John Plumstead told Canning: “You have brought ruin on yourself. You must have known over those 15 years that it would all catch up with you.

“You lived in a world in your own head where you were taking money from your employer persistently to a very high level. I am afraid it’s caught up with you.

“You have lost your home and your family. It was all started by your dishonesty. You spent a good deal of the money on others, as a providing father, but that wasn’t your money to spend.”

But the judge said he was reducing the sentence because of Canning’s genuine remorse, shown by his continuing wish to end his own life. “That’s proof you have taken this matter properly to heart.”

Judge Plumstead added that Canning was still a young man with half his life ahead of him and told him to go to prison with his “chin up” and focus on being released on licence in two years’ time.

“Don’t surrender to the hopelessness you have felt since your apprehension.”

Prosecutor Ann Evans detailed how Canning spent the bulk of the money. She said £500,000 went on mortgage payments; £209,000 on family holidays; £338,000 on shopping; £248,000 on clothes; £65,000 in restaurants; £182,000 on cash withdrawals and cheques; £158,000 on overdraft and accountancy fees; £39,000 on schooling; £84,000 on dating sites such as Ashley Madison and “camgirls” and £11,000 on gambling.

The court heard that early this year a colleague found an invoice which had been duplicated and began investigating. The web then unravelled.

“He was not a qualified accountant but it took the firm an awfully long time to catch him out,” said the prosecutor.

Mitigating, lawyer Mike Warren said Canning was trying to maintain a lifestyle which his own salary couldn’t meet.The situation got out of control.

Last autumn he arranged for external accountants to take over his financial role “to try to put temptation” out of reach but the fraud was discovered after Christmas before the contract began.

Canning was described as “in deep despair.”

Mr Warren said: “He has made repeated suicide attempts following his detection. One was to an internet company in Holland advising him how to commit suicide and when that didn’t work there was a referral network in place and two police officers knocked on his door and he was taken into a unit on a voluntary basis.

“He has been in psychiatric care since spring. One self-harming was this morning, on the day of being brought to court.”

He would need to be watched carefully while in prison, he added, a sentiment also voiced by the judge.

The Crown is pursuing an application to confiscate Canning’s assets. There is some equity in the £550,000 family home, the judge was told.