Re: [Evolution] How to forward a message with a rule ?



On Thu, 2008-09-11 at 17:44 +0200, Aconai - Consultant Informatique
wrote:
Thanks, but have you an exemple of a script ?

Regards,

Michel


Here's a simple one. 
One utilizing perl/python/ruby with their 'email' handling 'modules'
would probably get you a prettier end result ( i.e. this one causes all
of the original header info to be part of the forwarded email body.
Loading the email into the email handling module, you could forward only
the portions that you want ).

rthompso raker ~/bin $ cat forwardmail 
#!/bin/bash

tmpfn=fwdmail.??
cat /dev/stdin >/tmp/$tmpfn
subject=`grep Subject: /tmp/$tmpfn |head -1`
subjecttrim=${subject#Subject: }
#
# this is all one line
cat /tmp/$tmpfn | mutt -x  -s "FW: $subjecttrim"   john doe someplace com jane doe elsewhere com

rm /tmp/$tmpfn


exit 0


You can test this from the commandline if you want.
Edit the recipient email addresses appropriately.
Use evo to save an email to disk ( theemail ).
$ chmod 755 forwardmail
$ cat theemail | forwardmail





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]