A Greater Manchester used-car dealer that sent hundreds of thousands of spam texts has been fined £40,000.