A court heard he had sold the substance to people without checking they had a licence