My grandma used to do it all the time. She baked them in coffee cans and put a recycled plastic lid on the end, sent them as gifts to the relatives out of town. She was into recycling before it was cool. You bake them by putting the can on a flat cookie sheet and filling it 2/3 full. If she wasn't mailing them, she just gave them to us with foil over the top.
I am not sure what kind of metal coffee cans are made of, so I'd check out this idea for health issues. But my grandma lived to be 99.
(My neighbor used to give us cakes etc in coffee cans when I was a kid. I love the idea, but I don't buy coffee in cans. :/ I will have to use something else instead.)
My wife just wraps these types of breads in Saran type plastic wrap, puts them in a tin, and the tin in a box with padding. They seem to do fine.
As for baking in a coffee can, I know someone that has used coffee cans to bake bread in their solar oven for years. The bread comes out fine and makes nice round slices for sandwiches and burgers.
Years ago, when I had boyfriends who moved away or whatever, I would make banana bread (a sunset recipe I still have) and mail it regular mail to them. No problem.
But I have made a few small moist cakes by baking them in a water bath but the cakes were in the pint wide mouth mason jars..
Just fill the jars about 2/3 full, place them in a deep cake pan and then place in the oven and add boiling water to the cake pan about 1 to 1 1/2 inches-keeps the jars safe and the cakes moist! just bake like normal and then if you put a good canning lid on and put in the fridge they last quite a while. But the goobermint says that "canning" cake like this is not safe.
They never last long enuf to spoil at least at my house. and they ship well.