A new model for the infrared emission of quasars