Where are you located? I just called my dealer and they said that the only way a Mazda5 will do this is if you have the "credit card" key like SGT_OKINAWA has.
Agree, I stopped by the local Mazda dealer over lunch time and in my broken Japanese/ Engrish I asked two questions:
1. How do I get my power fold in mirrors to fold in automatically when I turn the key off?
2. How do I program the door locks to lock when I put it in Drive, then unlock when I put it in Park.
The guy looked so confused, I wanted to just laugh and leave, but he was determined to 'assist me' and went in the back, asked some of the mechanics and staff people and each would look out the window and then give him an answer. Most likely they had no idea what I was talking about, ...
He said:
1. Mirrors will not do auto fold in.
2. Never heard of the doors auto lock like that, said it's a export option, no need for that here in Japan because they have such low crime rate and even lower carjacking rate.
So, bummer. (headshake looks like neither will work for me.
Peace!(rei)