I'm not aware of an option to make the mirrors fold out or in when you open/close your door, but if your good with them doing this when you lock or unlock the car then thats possible. Here are all of the mirror notes I have in my coding notes.
BDC_BODY
Close windows, sunroof & mirrors from key fob:
3056 KOMFORTSCHLIESSUNG_FB (Comfort Access ONLY) Set to: aktiv 00
3110 ASP_BEIKLAPPEN Set to: aktiv
3110 ASP_BEIKLAPPEN_BEI_KOMFORTSCHLIESSEN Werte=01
3110 ASP_AUSKLAPPEN_NACH_KOMFORTSCHLIESSEN Werte=01
Set Mirror Fold Delay Time
3056KOMFORT_SCHLIESSEN Werte=00
3056 -> Komfort_Schliessen -> Werte=xx
This setting sets the time to wait after you hold down the key fob or comfort access before the windows will roll up and mirrors fold.
Werte=00 - Close immediately, note if you set this to 00 you cannot lock the car without the windows rolling up and mirrors folding.
Set to: wert_01 Werte=0F (Default)
Werte=xx - Any other value (in hex) for the delay, in 100ms. (For instance setting 05 will be about a half a second, and allow you to lock without rolling and folding by pressing for less than half a second)
**I used 03 instead of 00 incase I ever want to lock the car with the windows down, 03 is about the same as a medium press on the other buttons, I count to 3 or release when I hear the mirrors start folding in
3056 -> Komfortschliessung_FB -> Aktiv (This is done above for roll up from key fob)
3110 -> ASP_Beiklappen_BEI_Komfortschliessen -> 1 (This is done above for roll up from key fob)
3110 -> ASP_Ausklappen_Nach_Komfortschleissen -> 1 (This is done above for roll up from key fob)
BDC_BODY -> 3056 PWMaster, 0F -> KOMFORTSCHLIESSUNG_PA (Closing over comfort access)
Set to: aktiv Werte=00 Enable (Default)
Set to: nicht_aktiv Werte=01 Disable
Enabling this will enable closing over comfort access
(Note this value is backward, 00=enable, 01=disable)
Also, some coding is discussed in this thread
http://www.mybmwi3.com/forum/viewtopic.php?f=11&t=1616 though it does get off topic for quite a bit.