"When she returned she sat down and took a mouthful. She immediately noticed it did not taste right, she put it down and commented on the taste.
"She began to feel tired, asked you to leave her house," Judge Snell said.
Smith went to the bathroom and remained in the house in what the judge believed was a tactic to delay leaving.
When Smith eventually left, the victim locked her doors and emptied the mug noticing a pink paste in the cup.
"She went to bed and fell into a deep sleep, something she'd never normally do."
The next morning Smith returned to his neighbour's house and asked if she had finished her coffee and told her he had put tablets in it.
"You explained: 'It wasn't to hurt anyone or for sexual things, she obviously never drank it so I left it at that'."
Smith had 19 previous convictions which Judge Snell said were "deeply concerning".
They include offensive language, committing an indecent act and indecent assaults on women. He has spent time in prison for those crimes.
"It's abundantly clear you are somebody that has a heightened and somewhat depraved sexual predilection. There can be no doubt this offending can be related to those tendencies you have," Judge Snell said.
"You denied there were any sexual undertones, you said you did this so you could get yourself back into prison and drugging your neighbour was one of the least harmful options to do so.
"I believe those explanations are farcical and are utter nonsense."
In a written victim impact statement, the woman said she refused to be a victim.
"She says the real victims are your parents. They put a roof over your head and supported you and effectively this is how you repay them."
The victim said she suffered from heightened anxiety after the incident.
Judge Snell said Smith was "a sexual predator" who had a high risk of harm to the community.
"You have a history of high sexual compulsion and an attraction to deviant sex.
"You do not regret your offending as it has achieved the result [imprisonment] but you are remorseful of the harm and the potential harm to your neighbour.
"Your willingness to employ a stupefying tactic on a woman described as a friend is a significant concern."