<<< Date Index >>>     <<< Thread Index >>>

Re: Reading mail from CLI with Mutt



Just to add my two cents.  I have been trying to extract attachments
from emails and everything that I looked at did everything but didn't do
the extraction part.  So I downloaded the mutt source and modified it to
support a "batch mode".  The batch mode that I am using only supports
the pipe command.  The pipe command is a standard part of mutt.  Mutt
pipes the entire email to a command that I define in my .muttrc file.
In this case it is a munpack command which does the extraction.  The
pipe command is selected by 1) defining a macro in my .muttrc file and
2) push'ing characters into mutt in my .muttrc file to invoke the macro. I have made numerous changes to support a batch mode that does not
require curses or even any Unix terminal I/O.  I have built and tested
this on Windows ME and Mac OS X. That's the good news.

The bad news is that I am not a known developer for mutt and I haven't
had time to upload my changes back to the mutt web site.

Carl Klatsky wrote:
On Wednesday, August  2 at 06:24 PM, quoth cga2000:

python comes with powerful modules to send/receive mail (smtplib, poplib, imaplib) that are (obviously) designed to be invoked from scripts.

don't know if Perl has anything like this?


Oh ye of little faith, of course it does. Mail::IMAPClient,

Mail::Mbox::MessageParser, Mail::POP3Client, Mail::POPRelay,

Mail::Sender, Mail::Sendmail, to name a few.


OK, thanks, got lots of helpful feedback here.  When I referred to
"character-graphics mode", I did mean curses, and probably should have
phrased it that way.  I will check into the Perl modules for retrieving
the mail from the IMAP mail server, rather than the fetchmail & procmail
route.  I would image the Perl modules have a way to send the mail too,
but sending mail using Mutt is real easy & direct.

Thanks for all the input.
-Carl