procmail
[Top] [All Lists]

Cat a file to sendmail

2009-11-15 23:00:19
I tried the following:
   :0
   |(echo "Subject: Alert"; \
   cat $MYFILE)|/usr/sbin/sendmail -io  $MYAD

But this put the contents of $MYFILE into the subject.

I tried
  :0
   |(echo "Subject: Alert"; \
   echo `cat $MYFILE`)|/usr/sbin/sendmail -io $MYAD

This worked, but instead of getting the file as formatted, I got it as a single 
line email.

that is, this file

 $ cat /tmp/summary
       1 .applescript-users.2009-11
       3 .httpd-users.2009-11
       1 .php-general.2009-10
       1 .postfix-users.2009-11
       6 total

arrived as

1 .applescript-users.2009-11 3 .httpd-users.2009-11 1 .php-general.2009-10 1 
.postfix-users.2009-11 6 total



-- 
'How come you know all that stuff?'
'I ain't just a pretty face.'
'You aren't even a pretty face, Gaspode.' --Moving Pictures


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)de
http://mailman.rwth-aachen.de/mailman/listinfo/procmail

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