Health conscious cannabis consumers seeking a safer alternative to smoking often assume vaporizers are the answer they’ve been looking for. While vaporizing cannabis can be a healthier alternative to smoking burnt plant material, if you buy a poorly designed vaporizer, it can still be an unhealthy method of consumption that exposes you to heavy metals and off-gassing of other nasty vapors. Thus, vaporizing provides that better option compared to smoking when constructed of the right types of materials.
The heating component on a vaporizer has the most potential to cause potential health problems.  A heating element made using subpar materials has the potential to off-gas toxic vapors when it heats up.  No-name, cheap vaporizers can have low quality metals and lead soldering in and around the heating element. These knock-off vaporizers are available on wholesale-type websites like Alibaba.
Aluminum as a heating element should be safe. Moisture getting onto the coil can cause oxidation, however, the oxidation layer, aluminum oxide, can protect the material from further corrosion, as long as the oxide layer is stable. Contrary to what some believe, aluminum cannot rust, since rust specifically refers to the oxidation of iron. The metal has a boiling point near 4473°F, or 2467°C, obviously well above the combustion temperature of cannabis, so it shouldn’t be off-gassing fumes from the metal. However, lower quality aluminum has been shown to emit fumes at lower temperatures when it comes into contact with acidic materials  – this is of concern because cannabis resin is acidic.
Some of the safer materials for heating elements, from a chemical perspective, are borosilicate glass or crystalline quartz. Glass is chemically inert, ecologically friendly, and it preserves the nuanced flavors of your bud. The downside to glass however, is that it can shatter through carelessness when handling it or thermal gradients developing due to stress from heat.
Another good option is high quality ceramic. Again, quality is very important as ceramic can contain aluminum oxide which can leach off at temperatures lower than its boiling point if of subpar quality.
While the idea of breathing fumes from heavy metals may make you want to abandon your dreams of vaping, there are safe designs and materials that can be used to prevent this. It is, however, crucial that you only purchase your vaporizer from a reputable brand and from an authorized retailer. Purchasing a cheap knock-off vaporizer from China may be good for your wallet in the short term but it could be deleterious to your health over time.It’s also important to note that, while substances that are considered “toxic” have been found to emanate from these types of devices, the effects of the exposure to these toxicants at the levels detected has not yet been determined. Do your homework, ask questions, and investigate what materials the device is constructed from.
References Olmedo et al., “Metal Concentrations in e-Cigarette Liquid and Aerosol Samples: The Contribution of Metallic Coils”, Environmental Health Perspectives, 2018, open access  Hess et al., “E-Cigarettes as a source of toxic and potentially carcinogenic metals”, Environmental Research, 152: 221-225.  Al Juhaiman, “Estimating Aluminum leaching from Aluminum cook wares in different meat extracts and milk”, Journal of the Saudi Chemical Society, 14(1): 131-137.