procmail
[Top] [All Lists]

Put From/Subject into BODY

1997-03-19 16:50:05
Hello! I have just joined this mailing list.

I want to create email-to-pager script for Japanese pager service.
What seems to be different from services in other countries is that
only the body of email is displayed on pager.
So I want to reorganize the incoming email
by extracting From: and Subject and put them in Body,
and replace From: to my address, To: to my pager service address.
Subject is ignored by the pager service.

I created following script but it is painfully far from functional.
Please give me advice.

:0 c
* (^To:.*(important|urgent)|^From:.*(important.com|urgent.com))
{
FROM=`formail -xFrom:`
SUBJECT=`formail -xSubject:`
(formail -I"From: furu(_at_)009(_dot_)com" \
-I"Subject: forwarding to pager" \
-I"To: 0399999999(_at_)docomonet(_dot_)or(_dot_)jp" \
$FROM $SUBJECT)|$SENDMAIL -t
}

Thanks in Advance,
_/_/_/      Mitsuru FURUKAWA      _/_/_/
_/_/_/        Tokyo, Japan        _/_/_/
_/_/_/     mailto:furu(_at_)009(_dot_)com    _/_/_/
_/_/_/  http://www.009.com/furu/  _/_/_/

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