On Sun, Nov 15, 2020 at 23:19, Cameron Simpson <[email protected]> wrote:
> On 15Nov2020 09:56, Olli Savolainen <[email protected]> wrote: >>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.) > > Is this once off or to happen regularly? > > You could for this: > - save all the messages to a local filesystem maildir folder > - write a short shell loop to run mutt -H for each message file in the > maildir > > Cheers, > Cameron Simpson <[email protected]> Thanks! This is what I was looking for. Couldn’t find any documentation on what the file format is but now I know. I suppose this could be mentioned on the man page. Thanks for all the other replies too everyone, Olli
