I'm getting ready to install a nema 14-50 outlet for an electric car/vehicle (EV) and I'm looking at the details. I found out that NEC 2017 section 314.17 talks about enclosures but I'm a bit confused. The outlet will be in my (attached) garage so it would be indoor. I'm planning to run NM-B cable (AWG 6 or 8, about 15 ft inside drywall) from the breaker box (upstairs) where I'll have it connected to a 40A breaker. I can't do 50A breaker because my SE cable is rated at 75A and the main breaker is 60A. The city permit people had no problem with this when I consulted them. I can use it at night when nothing else is being used. Do I need a metal box for the outlet? Will attaching the cable to the stud within 8in of the box be required? Am I missing any other details?
Thanks