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

Re: Message template



Quoting Derek Martin (invalid@xxxxxxxxxxxxxx):

> > Write the template e-mail, postpone it.
> > Open the postponed folder, save the template elsewhere.
> > Use mutt -H template from the command line.
> Thanks Thomas.  That's doable, and I should even be able to script it
> (which is what I was hoping for).

If you want to script it, may i ask why you want to use mutt? :-)
Script-wise it's easier to have something like:

--[ template.eml ]--
blahblahblah
username: ##USERNAME##
ticket# : ##TICKETNO##
blahblahblah
--[ template.eml ]--

and 

--[ sendit.sh ]--
#!/bin/sh
cat template.eml | \
   sed -e "s/##USERNAME##/$1/g" -e "s/##TICKETNO##/$2/g" | \
   mail -s "Ticket assignment" $3
--[ sendit.sh ]--

So you can do: $ sh sendit.sh root 1234 root@xxxxxxxxxx
Or something similar.

Just my $0.02
Sander.
-- 
| Jesus saves! .. Passes to Moses .. TOUCHDOWN!!!!
| 1024D/08CEC94D - 34B3 3314 B146 E13C 70C8  9BDB D463 7E41 08CE C94D

Attachment: signature.asc
Description: Digital signature