An attempt to supply drugs through the post was scuppered when the smell of cannabis was reported coming from a parcel.
Police were alerted after Paul Pinner, 42, took the package to Red Lodge Post Office in May, this year.
Ipswich Crown Court was told how a member of postal staff had recognised the smell of cannabis coming from the parcel.
Prosecutor Robert Sadd said: “It was not wrapped perhaps as carefully as it might have been.”
When police opened the package they discovered cannabis and amphetamines within.
Pinner, of Ash Court, Red Lodge was arrested shortly afterwards.
He pleaded guilty to two offences of attempting to supply a controlled drug and one of possession of cannabis on Monday.
The drugs had an estimated street value of up to £735, said Mr Sadd.
Pinner, a father of four, had been sending the drugs to a friend.
Rory Keene, mitigating, said that with the cost of packing and postage Pinner could not have hoped to make a profit.
The court heard that Pinner was a regular post office customer having sent many parcels to addresses all over the UK.
The packages contained items such as iPhone covers and Louis Vuitton belts, said Mr Keene.
He said the quantity of drugs involved had been only ‘modest’ and it had been an isolated incident.
Sentencing him, Judge John Devaux told Pinner that he accepted the attempted supply of drugs had been to only one person and had not been part of a commercial operation.
Pinner was ordered to complete 180 hours of unpaid community work within the next year.
Judge Devaux told Pinner that he would have to return to court later this year after financial investigators had established what value of his offending could be recovered from him.