Substitute for a reed switch?

You could use a hall-effect sensor; you could also use an optical sensor of some sort (you would likely need to use modulated IR light to prevent interference from external light sources)...