On 05Jul2021 19:19, Julius Hamilton <julkh...@gmail.com> wrote:
>I would like to retrieve the contents of my inbox - the emails' 
>metadata,
>sender, subject, date - to stdout, rather than by opening an application.
>Can Mutt dump the inbox page? Does it have any way to return to stdout
>information about the inbox? Or should I use a different tool for this?

I would use a different tool. Personally I'd write a little Python 
programme to read you inbox (IMAP? Local mail folder?) and report.

>I would also like to retrieve the body of a specific email in the same way,
>to stdout. Do the emails have identifier tags by which they can be
>specified? Or, what would be a way to do this?

All messages have a Message-ID: header which has a unique value per 
message. Mutt's %i pattern operator matches message-ids. I suppose you 
could invoke mutt from the command line this instructions to open the 
message based on the message-id and "print" it, specifying the print 
action as something which writes output.

But again, if I'd already written the Python programme above (summarise 
ths inbox) it would probably be easier to extend that to write out the 
desired message.

More context? There are probably already tools to do things like what 
you suggest, even if they are not exact matches for what you ask for.

Cheers,
Cameron Simpson <c...@cskk.id.au>

Reply via email to