Apparatus and methods are described for use with a vaporizer (20) that vaporizes at least one active ingredient of a material (82). In response to receiving a first input to the vaporizer, the material is heated, in a first heating step. An indication of the temperature of the material is detected, and, in response to detecting an indication that the temperature of the material is at a first temperature, the first heating step is terminated, by withholding causing further temperature increase of the material. The first temperature is less than 9 percent of the vaporization temperature of the active ingredient. Subsequently, a second input is received at the vaporizer. In response thereto, the material is heated to the vaporization temperature, in a second heating step. Other applications are also described.