It is not illegal to mail cash within the US, unless you're trying to avoid paying taxes/launder money.
Not sure about other countries, a cursory web search didn't turn up anything useful.
Reply on news.ycombinator.com