In accordance with the present invention, there is provided a mask, such as a nasal pillows mask, for achieving positive pressure mechanical ventilation (inclusive of CPAP, ventilator support, critical care ventilation, emergency applications. The mask of the present invention includes a piloted exhalation valve that is used to achieve the target pressures/flows to the patient. The pilot for the valve may be pneumatic and driven from the gas supply tubing from the ventilator. The mask of the present invention further includes a heat and moisture exchange (HME) device which is directly integrated into the housing or cushion thereof (thus residing in extremely close proximity to the patients nostrils), and is further uniquely configured to induce a flow pattern between it and the cushion which maximizes the transmission of heat and moisture to air which is inhaled by and exhaled from the patient through the mask.