transmission slips on 2004 Dodge Ram 1500

my transmission slips and check enine light comes on after truck gets wet, ii.e., rain, car wash etc. quits slipping in about 10 miles of driving. light goes off at random times. sometimes a day or two other times a couple weeks.

Asked by for the 2004 Dodge Ram 1500