Five years after he filed a defamation lawsuit against Kesha, Dr Luke is finally getting his day in court.

The producer and his one-time protegee are now on course to go to trial next year DailyMail.com can reveal, after a New York appellate court denied Kesha's latest appeal.

Dr Luke - real name Lukasz Sebastian Gottwald - is suing the singer for defamation, claiming that Kesha made false claims about him so that he would release her from the recording contract she had signed with his label.

'Kesha and her representatives repeated her false accusation that Gottwald had purportedly drugged and raped her in countless public forums,' states Dr Luke's complaint.

It also states that Kesha 'spread a knowingly false and wholly defamatory accusation that Gottwald had purportedly raped another female recording artist.'

Kesha had already filed an appeal that was rejected by the court last year, and this latest legal woe comes after she was granted reconsideration.

Scroll down for video

Tik tok: Kesha had her bid to appeal the defamation lawsuit filed against her by Dr Luke (pair above in 2011)

Kesha sued Dr Luke in 2014, claiming that she was drugged and raped by Dr Luke in 2005 after the two attended a birthday party for Nicky Hilton.

That alleged attack, followed by years of what Kesha claims was psychological abuse and fat-shaming, left the singer with 'severe depression, post-traumatic stress, social isolation, and panic attacks.'

Kesha and her lawyers argued this behavior was a breach of contract and demanded the singe be allowed to abandon her record deal with Dr Luke.

Then court ultimately ruled in Dr Luke's favor, forcing Kesha to record three more albums with the producer.

Kesha has unsuccessfully appealed that decision three times.

Dr Luke filed his suit the same day as Kesha back in October 2014, and also named her mother and manager for defamation as well in the that initial complaint.

Kesha's mom and manager were later dropped from the complaint due to jurisdiction issues in the case, though the two are still accused of aiding Kesha in the complaint.

'Kesha and her team also promoted boycotts and social media harassment of third parties who continued to work with Gottwald in order to pressure them to stop doing so,' states the complaint.

'Kesha’s management even went so far as to develop a plan for “leaking” to the public the cell phone numbers and email addresses of top-level executives from SonyMusic Entertainment and its related entities.'

Gottwald and his attorneys have presented evidence that they also claim shows how close Kesha was to Dr Luke, including a birthday card.

In the card, Kesha praises Dr Luke, writing: 'To the FOXXY-est producer ever! Ur just getting better with time! Thank you for making my wildest dreams come true!'

Kesha had previously lost an appeal last year, but the court granted her reconsideration to preview her arguments and evidence supporting her appeal

The card, which was given some time after 2009, is signed by Kesha and a name that is unclear but could be her older brother Lagan.

Dr Luke argues that Kesha and here mother Pebe Sebert launched their smear campaign in a bid to extort him.

That card, among other things, offers proof that Dr Luke never raped the singer, reason his attorneys.

Kesha publicly alleged that Dr Luke drugged and raped her when she was 18 while trying to get out of her contract with the producer and parent company Sony, a bid that was denied in 2016 by a judge.

Dr Luke also submitted a detailed public relations campaign that was put together by Sunshine Sachs as evidence.

That plan detailed how the agency planned to assist Kesha's legal team 'by inciting a deluge of negative media attention and public pressure on the basis of the horrific personal abuses presented in the lawsuit. '

The agency also spoke about how they would leak details of lawsuits before they became public to TMZ so as to allow the website time to plan a post.

There are also a number of emails sent by Kesha's mother in which she praises the producer.

'I know you are going to be a great dad,' writes Pebe Sebert in one email.

'You are part of our family,' she tells Dr Luke in another exchange submitted as evidence in the case.

In May 2009 she told Dr Luke: 'Thank you for all you do for Kesha. We both love you.'

And in 2010 she wrote: 'Thank you Luke . You have changed our lives forever. I love you !!'

The defamation case also includes lengthy depositions from Dr Luke and Kesha.

Dr Luke made claims about Kesha being a liar after he was questioned about her claim that he had raped her when she was a teenager.

Her lawyer asks at one point: 'Are you aware that Ms. Sebert - that there is evidence in the record that Ms. Sebert told doctors and medical providers that she had been raped by you prior to 2014 or prior to this lawsuit?'

DailyMail.com saw that evidence, which Dr Luke dismissed by stating: 'I don't -- in sum and substance, I think that is -- that you are wrong to say that she has spoken to multiple doctors prior to these lawsuits and said that she was raped by me. I would say that that is not a correct statement.'

It was later asked if Dr Luke had any knowledge of Kesha telling people he had drugged her, years prior to filing her suit.

That was the final straw for Dr Luke.

'Kesha's a liar and Kesha lied a lot. And it was something that I spoke to her about quite a bit. And she apologized to me and admitted that she lied,' claimed Dr Luke.

'And if you're talking about the email from Jared Scharff, it also says afterwards that she - afterwards did - was completely drunk and wasted and did a tequila shot on the hood of his friend's car.'

That last comment drew the attention of Kesha's lawyer who asked: 'What does that have to do with anything?'

It was later asked of Dr Luke why he was so eager to work with Kesha if she was such a liar.

'She apologized to me. She, you know, it was one of the conditions of us moving forward and working again when she came back and wanted to work with me again,' said Dr Luke.

'And I said, "Hey, you need to make this right and you've got to be responsible and you can't just make up stories." A lot of the lies that Kesha told were sort of, I'd say, maybe non-harmful lies, like, you know, her father is Mick Jagger. About, you know, breaking into Prince's house. And, you know, like -- she had a whole lot of stories that she would tell.'

He then said he never thought she would 'stoop so low' as lie about rape.

'I've witnessed somebody lying about rape and making something up like that and it's disgusting. And it's -- you know, it's -- it's a horrible thing. It does incredible damage.'

He continued: 'And it's really horrible to women who actually have been raped which is a very serious, you know, serious problem. And it's disgusting. And, you know, the truth is, is I'd seen glimpses of it but never imagined it could be this bad.'

In her debut single Tik Tok, Kesha sang about kicking men to the curb 'unless they look like Mick Jagger.'