Customs NZ intercepted the drugs and a subsequent police search of Heatley's address found more MDMA and LSD, as well as cannabis and Ritalin.
The total value of the haul was estimated to be more than $70,000, Judge Crosbie said.
Detective Hamish Barrons, of the Southern district organised crime squad, told the Otago Daily Times the sentence was a deterrent to others.
''Mr Heatley, who was a student, thought he had come across an opportunity to make some fast dollars by importing and selling drugs,'' Det Barrons said.
''This sentence sends a message to any like-minded people wishing to get involved in drug importations that this kind of behaviour is risky and that you will be caught.
''The message we send is: you are nuts if you want to play Russian roulette with your future by importing drugs to make a quick buck.''
Judge Crosbie said, in sentencing Heatley, that although he was remorseful, young and had no previous convictions, such offending ''ends up ruining lives''.
Although Heatley had no prior involvement with the criminal justice system, he ''really landed here with a thud''.
''The message to you - and the message to others out there in the community that think the worldwide web provides a simple, accessible process to importing these drugs - is you should stop thinking that way,'' he said.
''You're not the first young man who has been dealt with by the court on this sort of offending ... and the end point is always the same - they go to prison and they go for quite a long time and in the process they bring sadness to their families and others in their lives who may be affected by their offending.''
Defence counsel Campbell Savage said his client was ''naive''.
''He's another one of these young people who had no idea of the peril he put himself in,'' he said.
''One should always know the stakes before they enter the game and this young man didn't.''
Heatley was attending polytechnic at the time of his offending and is listed as a male model on an Otago modelling agency's website.
He received jail sentences of two years and nine months for possessing Ritalin for supply, possessing MDMA for supply and importing MDMA into New Zealand; 18 months for selling cannabis to an adult and possessing it for supply; and nine months for possessing LSD for supply.
The terms are to be served concurrently with the four years' imprisonment for the most serious offending.
Last year, a Palmerston North student was jailed for four years after importing ecstasy and cocaine bought via the internet.
Det Barrons said police would continue to target such offending.
Three supporters of Heatley, who were in court yesterday, were visibly upset after his sentence was delivered.
Heatley stood quietly in the dock throughout his sentencing.