Former Auburn deputy mayor Salim Mehajer has been accused in court of impersonating a police detective in a fake email.

Key points: Justice Robert Allan Hulme said Mehajer has "an arrogant disregard for the law"

Justice Robert Allan Hulme said Mehajer has "an arrogant disregard for the law" Mehajer was also accused of stockpiling Panadol, Nurofen and prescription medication in jail

Mehajer was also accused of stockpiling Panadol, Nurofen and prescription medication in jail He said he did not know drugs could be sold in prison and accumulating the medication was "an innocent mistake"

The former property developer, who is representing himself, appeared in the NSW Supreme Court to apply for bail via video link from Cooma prison.

He is serving time after being found guilty of electoral fraud offences, but is appealing that conviction.

Lawyer for the Crown Jennifer Single told the court she had received a letter from NSW Police alleging they had found an image on Mehajer's phone of what appeared to be an email purporting to be from Police Detective Sergeant Matthew Taylor.

Ms Single said police claimed Mehajer was pretending to be the officer in the email, using an old email signature from 2016.

The court heard the email references a Federal Court matter between the Australian Taxation Office and the company Mehajer Bros, and begins by saying "Hi Salim, sorry for the delay", going on to claim that dangerous driving charges against him had been withdrawn.

The court heard police are investigating the allegedly fraudulent email.

NSW Police confirmed this to the ABC outside court.

'Arrogant disregard for the law'

In arguing against his application for bail, Ms Single also said Mehajer had "no prospects for success" and had already committed a long list of offences while in custody, including "stockpiling" the prescription opioid oxycodone, Panadol and Nurofen in his jail cell.

Ms Single said when the "stockpile" was discovered Mehajer told prison officers "it's not heroin, it's not cocaine, it's all OK".

Mehajer told the court that he "didn't mean to stockpile medication", didn't know drugs were sold in prison and that it was "an innocent mistake".

The court heard Mehajer was declared a flight risk by the Australian Federal Police, and that his financial situation was "precarious" with a tax debt of over $8.6 million and bankruptcy declared earlier this year.

His application for bail was denied, with Justice Robert Allan Hulme stating "the prospect of success is meagre or perhaps non-existent".

"Mr Mehajer has an arrogant disregard for the law of this state," Justice Hulme told the court.