One creepily persistent French man will be spending more than a few nights in jail for sending thousands of messages to an ex-lover.

The 33-year-old man, who has not been named, was so obsessed with extracting a “thank you” (or money) from his ex-girlfriend for upgrades he made to their apartment before their 2011 break-up that he harassed her in calls and texts — 21,807 of them, over the course of 10 months.

In the 90 minutes it took for the woman to file charges, she received over 100 phone calls, her lawyer said, according to RFI.

“It was stupid,” the man admitted in a Lyon court on Thursday, according to RFI. “At the time my logic was that until she returns the money, she pays back for work I carried in our apartment or at least says thank you, I would not stop the calls.”

He was fined 1,000 euros ($1,296) and sentenced to 10 months in jail, though six months of that sentence was suspended, according to Agence France-Presse.

“She tried to block her line, but he phoned her parents instead and her workplace,” Manuella Spee, the victim’s lawyer, told AFP.

When the man and his ex-girlfriend — a 32-year-old teacher — met with a mediator and she finally gave him the “thank you” he was looking for, the messages and calls stopped.

The man, who has acknowledged that he struggled with depression in the past, is not allowed to continue contacting her and will have to undergo a psychiatric evaluation.

The teacher, on the other hand, has “enjoyed a fantastic summer time, with no phone calls,” her lawyer said, adding that the woman “hopes it will last.”