Thank you for getting back to me. The first thing to do is make sure all conditions are right for your snake. You do need a thermometer. You should have a temperature gradient of 75 to 85*F (23 to 29.5* C) in the non-basking areas. An under-the-tank heating pad is the best way to do that. Never use the heated rocks. A basking area that's warmer (around 85 -90*F or 29.5 to 32*C)) than the rest of the enclosure is also needed in the day time. An overhead basking light is an easy way to provide that. Any sort of lamp that will take a 40-60 watt incandescent bulb (or you can buy a ceramic light fixture made just for reptiles). If you live in an area that has farm stores, you can buy a metal light fixture made to keep baby chicks warm for just a few dollars. Don't buy the accompanying bulb, however. You need an ordinary incandescent bulb in the basking light. Home improvement stores and hardware stores also sell similar lights as work lights. You’ll want to invest in a good digital thermometer to accurately measure temperatures. You don’t need a UVB light.
There are several substrates that are appropriate, but never use cedar or pine shavings. I prefer solid substrates, such as ceramic tile, reptile carpet, or shelf paper. They’re easy to keep clean and there’s no danger of the snake ingesting them.
Make sure your snake also has a hide box, a water bowl big enough to bathe in (it doesn’t matter where you place it), and a branch to climb on. If you take a small branch from outside rather than buying it from a pet store, it will need to be disinfected. There is a lot of conflicting and false information available. Here's a site specific to corn and rat snakes with lots of good information, including how to disinfect a branch.http://www.anapsid.org/corn.html
A snake can go for quite some time without eating, but you want to make sure everything is right. Some of the color morph corn snakes are prone to eating disorders. It may be that your snake is one of them. I'll give you a first aid measure to take just in case he's a bit dehydrated. Buy some unflavored Pedialyte (yes, the kind for human infants), and prepare a shallow bath consisting of 1/2 water and 1/2 Pedilayte. Soak your snake for about 20 to 30 minutes twice a day. Snakes can absorb the electrolytes through their vents.
You can also try feeding an unusual food, such as a small anole from the pet store. Sometimes that can encourage eating. If you have more questions, just let me know by clicking on REPLY.