Is there a reason you are concerned with "immunity function". Has this been diagnosed? have you ever asked a Doctor about it.
I have read a few articles that have connected diets to immune system boosts.
The one thing that seems pretty reliable is that a good intestinal flora really really helps. Or maybe it's just that people who get sick frequently have wrecked their little intestinal ecosystem with antibiotics. Vegans who don't eat yogurt may have more trouble with this more than other people. I don't think you need daily doses of probiotics to maintain a good system (unless it's wrecked). but regular infusions from a supplement or yogurt or a fermented food is an excellent idea.
M'aiq discussed Vitamin C. As it turns out, Vitamin C is good for colds is not an old wives tale. But its also true that your body does not store Vitamin C. It is constantly coming out of your urine. So it's not "mega-doses" you need but regular and constant infusions. If you eat fruit and vegetables this should happen without much thinking about it. but make sure you eat some. My favorite fruits are apples and bananas, but they don't have that much vitamin C. So lately I have been adding a glass of cranberry juice to my daily routine. But if you like oranges, they are even better. Skip the frozen or made from concentrate OJ, though, that stuff is garbage.
Besides Vitamin C, look for some foods with A and E. A lot of the good foods vegetarians eat are loaded with these. Like broccoli and spinach. It is also a good idea to include a few nuts in your daily routine.
Antioxidants are also good things to include in your diet. Again most "veggie" food is loaded with antioxidants. but if you need a good excuse to eat some dark chocolate, now you have one. The darker the chocolate the more antioxidants. Also, remember that milk chocolate is not dairy free.
Also, many spices have been associated with boosts to the immune system. Garlic is very powerful. good idea to include some garlic in any dish that calls for it.
Another spice that seems to have a lot of beneficial effects is Tumeric. Tumeric can be made into a tea. It is also great in a tofu scramble.
Unless you have celiac's disease or a gluten sensitivity, you don't need to go gluten-free. Actually, gluten is good for you. Its a great source of protein, calcium, and iron.
I wouldn't even worry about the small amounts of gelatin they include in foods. It's not going to affect you one way or the other. I would be more concerned with the 30 grams of highly processed refined sugar the candy bar contains, what that does to your insulin levels, and the subsequent inflammation it causes.
There are many good topical solutions for athletes foot that you can find in any drug or dollar store.