If you apply heat to the wire it will expand and shatter the glass. What you must do is to hold the wire near to the glass (but NOT touching the glass) with a pair of needle-nose pliers.
This will suck heat away before it reaches the wire in the glass. You can then use a very hot iron to quickly “tin” the end of the wire with solder.
Then tinned copper wire can be soldered to the reed switch wires, still using the pliers.
If you need to bend or shorten the reed switch wires (not recommended) you must again grip the wire close to the glass with pliers and bend or cut the wire furthest from the glass. The pliers will prevent any strain on the glass.
Once it’s prepared, the reed switch can be glued in place using hot-melt adhesive or similar. If you use Evo-Stick DO NOT let it touch any connections because it corrodes metal.
How to test a reed switch
Connect a multimeter to the reed switch with the lowest resistance (Ohms) range selected. The meter should indicate infinity. Now bring a magnet close to the reed switch. The meter should indicate zero Ohms as the switch reds click together. The orientation of the magnet is important. Hold it so that its North pole is close to one wire and its South pole is close to the other.
Reed switches for fun and security
These handy devices are used with magnets to detect doors and windows opening. They can also be used for amusement in conjunction with electronic counters, lights, LEDs and other devices.
Visit Here for more.