Pull the husks down to the bottom of the corn without removing the husks. Remove the silk.
Place corn in a sink or pot filled with ice cold water.
Let the ears soak in the ice cold water for at least 2 hours.
Remove the ears towel dry them.
Rub oil on kernels and place a couple slices of onion on cobs covering with husks.
Prepare a 225 degree fire in the smoker with some good smoke like mesquite, fig, hickory, apple, etc. and when it is ready place the ears of corn in the smoker leaving a little space between each one to allow the smoke to get around it.
You can use a gas grill:.
By placing your wood chips in foil with top poked for smoke to escape on grill over flame. When smoke starts lower heat to 225 degrees. Place corn on grill over indirect heat.
A good time to make compound butter of choice recipes above.
When the corn has been in the smoker for about 30 minutes, take the butter you prepared and carefully get about a teaspoon of it up under the husk of each ear of corn making sure to coat as much of the exposed ear as possible.