Sending all mail in IMAP folder from command line

Olli Savolainen olli at savolai.net
Sun Nov 15 09:56:23 UTC 2020


Hi,

I have draft messages appearing in an imap folder. I would like to write a script that reads a message (or all messages) from that folder and sends it as it is, then moving the message to imap Sent folder.

It seems something like mutt -H would do the job, just can’t figure out how to get it to read the message from the imap Drafts folder instead of a file.

Also not sure what is the file format mutt -H expects if I were to read the imap folder messages into a file first?

(If mutt doesn’t work for this I would also welcome help in the form of strategic pointers. Also say, a php, python or powershell solution would be ok - if you know this particular task would be easy in some another ecosystem, tips are welcome. This seems like such a simple task to automate that I’m mainly trying to minimize amount of code I’ll need to maintain.)

Kind regards,
Olli Savolainen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mutt.org/pipermail/mutt-users/attachments/20201115/c6cbe2bb/attachment.html>


More information about the Mutt-users mailing list