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

Re: Schedule messages to be sent later



On 2008-10-15, Ajeet <asgrewal@xxxxxxxxx> wrote:
> On Tue, 14 Oct 2008 17:32:05 -0700, Gary Johnson wrote:
> > If you want to do it periodically, you could set up a cron job.  If 
> > you want to use 'at', something like this will work:
> > 
> >    echo mutt -s \'at test\' address '<' /path/to/message/text |
> >    at now + 1 minute
> > 
> > Note that the input redirection operator < is quoted in the 'echo' 
> > command so that it is evaluated by 'at' and not by 'echo'.  The 
> > quotes around "at test" are also quoted so that 'at test' will be 
> > seen as a single argument to -s.
> > 
> 
> I meant to ask if its possible to do it from within mutt's compose menu.  
> For instance, I would like to send a reply to a message at a later time.

You could do this by first saving the message using the write-fcc 
command (bound by default to 'w') to some temporary file.  Then 
execute an at command like this:

   echo mutt -H temporary_file '<' /dev/null | at some_time

which can also be done from the compose menu.

The pipe command doesn't work very well for this since it pipes only 
the message text and not the headers, so you would have to provide 
the subject and address as arguments to mutt.  The write-fcc 
command, on the other hand, saves the message headers (except Date:) 
as well as the text in the specified file, so all mutt needs to send 
the message later is in that file.

Regards,
Gary