The Cylinder, Threaded - M12 package already includes it for your convenience. When the operating temperature is -25°C~70°C, proximity sensors will work well.
ICB12L50F06NO Features
ICB Series Operating Temperature: -25°C~70°C Sensing Distance: 0.236 (6mm) Voltage - Supply: 10V~36V Response Frequency: 2kHz Package / Case: Cylinder, Threaded - M12 Moisture Sensitivity Level (MSL): Not Applicable
ICB12L50F06NO Applications
There are a lot of Carlo Gavazzi Inc. ICB12L50F06NO Proximity Sensors applications.