I second what Mustang51 said.
I would also use a steel box,we call them 1900 boxes, and a steel cover and suitable 50 a device.
A good cord connector to connect cord to box. Preferably with strain relief
Make sure it is properly grounded.
Not OSHA approved as far as I know , but have been...