procmail
[Top] [All Lists]

replying and cc'ing another address, with one action?

1998-07-20 23:12:14
After doing some external validation of an email request, I'd like to send
the user an email stating the nature of the error.

I'd like to CC myself on these error's as well, so I know what's happening.

Is there a way to a reply with formail and add another recipient on to the
message at the same time?

I've been trying variations... but not getting much results, like the
following:

  * RESULT ?? (408)
  | ( formail -rt \
     -I"X-Loop: getfile(_at_)filemakermagazine(_dot_)com"; \
     -i"RCPT TO: $F"; \
    -A"RCPT TO: paul(_at_)isoproductions(_dot_)com"; \
    -i"From: getfile(_at_)filemakermagazine(_dot_)com";
        \
    -i"Subject: An error occured processing your request"; \
    echo "\n";  \
    echo "The email address passed to our validation script ";  \
    echo "appears to be incorrectly formatted."; \
    echo "We received $F. This message has been ";\
    echo "copied to the administrator. Please contact  ";\
    echo "paul(_at_)isoproductions(_dot_)com for further assistance. "; \
    ) | $SENDMAIL -oi -t


which results in:

procmail: Executing " ( formail -rt \
     -I"X-Loop: getfile(_at_)filemakermagazine(_dot_)com"; \
     -i"RCPT TO: $F"; \
    -A"RCPT TO: paul(_at_)isoproductions(_dot_)com"; \
    -i"From: getfile(_at_)filemakermagazine(_dot_)com"; \
    -i"Subject: An error occured processing your request"; \
    echo "\n"; \
    echo "The email address passed to our validation script ";  \
    echo "appears to be incorrectly formatted."; \
    echo "We received $F. This message has been "; \
    echo "copied to the administrator. Please contact  "; \
    echo "paul(_at_)isoproductions(_dot_)com for further assistance. "; \
     ) | $SENDMAIL -oi -t "
/bin/sh: -iRCPT TO: paul: command not found
/bin/sh: -ARCPT TO: paul(_at_)isoproductions(_dot_)com: command not found
/bin/sh: -iFrom: getfile(_at_)filemakermagazine(_dot_)com: command not found
/bin/sh: -iSubject: An error occured processing your request: command not found

Or piping the echo'd email to mail... but the subject doesn't seem to stick...

  :0 ahw # reverse mailheader and extract name
  * RESULT ?? (408)
  | ( echo "To: $F";  \
    echo "Cc: pevad(_at_)kudosnet(_dot_)com";  \
    echo "From: paul(_at_)isoproductions(_dot_)com";  \
    echo "Subject: Error processing your request";  \
    echo "The email address passed to our validation script ";  \
    echo "appears to be incorrectly formatted.";
        \
    echo "We received:"; \
    echo " $F. "; \
    echo "This message has been ";                              \
    echo "copied to the administrator. Please contact  ";               \
    echo "paul(_at_)isoproductions(_dot_)com for further assistance. ";         
\
    ) | mail $F,pevad(_at_)kudosnet(_dot_)com


Any pointers appreciated...

- paul

-------------------Kudosnet Communication Services--------------------
pevad(_at_)kudosnet(_dot_)com                                    
www.kudosnet.com


For value added web hosting and internet commerce sites
http://kudosnet.com/services/

-------------879 View Rd. Qualicum Beach, Canada V9K 1N3--------------


<Prev in Thread] Current Thread [Next in Thread>
  • replying and cc'ing another address, with one action?, Paul Evad - Kudosnet Communications <=