Is there any CLI email client/program which can read email mailbox file (with single email message) and produce output to stdout main headers and text?
$ mailcmd < email.file From: email@example.com Subject: some subject Message text: Hello world!
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
mutt -f email.file -e "push <decode-save><Return><Return><quit><Return>"
-e key execute following command
push add key sequences to the keyboard buffer
As result I get file with main headers and plain text from raw mailbox file
When I execute the script under cron or procmail:
export LANG=en_US.UTF-8 && screen -dm mutt -f email.file -e "push <decode-save><Return><Return><quit><Return>"