procmail
[Top] [All Lists]

Re: Sending an html file in a procmail recipe

2003-01-12 08:14:35
On Sun, 12 Jan 2003, LuKreme wrote:

L>
L> I would like thefile.txt to be self contained, so it was sent as a
L> valid HTML message regardless of whether it was procmail or simply:
L>
L> mail -s "thefile" user(_at_)domain(_dot_)tld < thefile.txt
L>
L>

Something along the lines of (please excuse useless cats and syntax
errors):

1. Create the file as a script (myfile.script)  with all the headers
except the to:


#!/bin/sh

cat <<xxxxENDITxxxx
to: ${1}
from: me(_at_)example(_dot_)com

message
message
message
xxxxENDITxxxx



2.

In your procmail recipes:

TOHEADER=`formail -rtz -x To:`

:0
{
  DUMMY=`myfile.script ${TOHEADER} | sendmail -t`
}


Alan


( Please do not email me AS WELL as replying to the list. Personal
  email is welcome but may invoke a password autoresponder. )


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>