the mirror heat elements are powered by the door control module in each door. This is attached to the window winder motor and runs the mirror heat and position, door locks and window glass winder.
The heater is on pins 5 and 6 on the 16 pin connector, black wires. If you take the door card off you will see the cables running from the mirror to the door control unit.
I would suggest you check the connection from each end as you might have a break where the wires go though the pivot where the mirror folds in.
Alternatively, it could be corrosion on the terminals (at either end). The external terminals would be more suspect as without a connection previously being made, the spade receptacles would have been open to the elements.