Some have asked about the wiring, looks like OP had to rig it up the best he could and this is how most do it.
The electrical parts are available, identifying and sourcing them is the hard part, Subaru will sell you mirror parts but not the internal wiring. I have sourced the parts, I am going to make up a run of signal wiring, to see if people would be interested. If you use my wiring, you can make the signal like stock, with the waterproof plug and the wiring snaps into the connector in the door. It looks like this:
Oh wow look at Subaru stepping up, I always wanted auto-dimming exterior mirrors I had to buy a 12 year old low end Lexus to get them ha. Neat how it is all integrated into the mirror glass, makes it a pretty low cost accessory, in fact $158 is a STEAL for dimming glass both sides. A new dimming glass one side for my Lexus is like $400.
Now of course this is all pre-wired on the Forester...previously the largest connector was a 10-pin but this new Forester must have a 14-pin they have added at least 4 more wires. To add all that stuff to another model you'd have to wire into the door from the mirror and interior lighting to get both those functions to work, would be way cool though.