Venting a clothes dryer directly outdoors is the best way to go, as this is the safest option according to building codes. This is because the air that comes out of the dryer is full of moisture, which can cause serious risks if not vented properly. It is not recommended to vent a dryer in a small space, such as a basement or mezzanine. This is because the hot, humid air can condense inside the pipe and trap lint, which can be hazardous.
Additionally, venting a gas dryer indoors is not considered safe due to the combustion vapors that enter through the ventilation grille. If you must vent a dryer in a mezzanine, you should use rigid galvanized steel pipes instead of corrugated pipes, since lint is more easily caught on corrugations than on smooth metal. Additionally, you will have to install a vapor barrier and insulation in the cross spaces before venting the dryer through the mezzanine. It is important to note that filters used in unventilated dryers tend to accumulate lint, so they need to be cleaned regularly.
My mother put the dryer in the basement to heat it both downstairs and upstairs and there was no moisture problem. Dryers are behind the magic of removing kilos of water from clothes through heat, venting the water in the form of steam. When it comes to safety, it is always best to follow building codes and vent your dryer directly outdoors. If you must vent your dryer indoors, make sure you use rigid galvanized steel pipes and install a vapor barrier and insulation in the cross spaces. Additionally, remember to clean your filters regularly to prevent lint buildup.