I wrote a console-based mail client, which was 25% C++ and 75% Lua for defining the UI and the processing.
It never got too popular, but I had users for a few years and I can honestly say MIME was the bane of my life for most of those years.