Niyi Onilude, 54, was arrested after a package he signed for was intercepted by prison officers at Wormwood Scrubs in west London on February 18.
It was found to contain cannabis resin and grinders for the drug, 13g of heroin at 57% purity, two Samsung mobile phones with chargers and batteries and a legal high known as Spice, Scotland Yard said.
Onilude, of Church Street, Stoke Newington, north London, admitted accepting the package containing drugs on behalf of inmate Shaun Barnabie.
They pleaded guilty to charges at Southwark Crown Court in London, along with Parice Lewis, 23, who wrapped and prepared the packages, police said.
Detectives believe several packages were smuggled into the prison after Onilude signed and accepted their delivery before they were passed on to Barnabie during class.
Lewis’s mobile phone was found to contain WhatsApp messages in which she bragged about the criminal enterprise she was running with Barnabie, police said.
Onilude was sentenced to two-and-a-half years for conspiracy to convey a prohibited article into a prison.
Barnabie, 32, of Wandsworth Prison, was jailed for five-and-a-half years for conspiracy to convey class A and B drugs into a prison, money laundering, conspiracy to convey a mobile phone into a prison and perverting the course of justice.
Lewis, 23, of Harwoods Road, Watford, was sentenced to 18 months for conspiracy to convey a prohibited article into a prison.
Detective Constable Lorraine Simpson, from the Met’s London prison anti-corruption team, said: “This sentence reflects the serious nature and the harm caused by the corrupt activity of prison employees.
“Through the hard work and determination of the Metropolitan Police’s London Prison Anti-Corruption Team and Her Majesty’s Prison Wormwood Scrubs, these individuals have been given a sentence that reflects the severity of the offence.
“We are committed to ensuring that those involved in trafficking drugs and mobile phones into prisons, along with any employee in an inappropriate relationship with a prisoner will be brought to justice.”
Pete Nicholls, local corruption prevention manager at Wormwood Scrubs, said: “This case demonstrates the hard work and dedication of prison staff working in collaboration with our partner agencies with the common goal of convicting staff, prisoners and their criminal associates involved in the conveying of drugs and mobile phones into our prisons.