[EMAIL PROTECTED] wrote:

> On Sat, 11 Nov 2000, Marco Shaw wrote:
> > Mutt will help you here:
> >   #>for each in `find . -name "*.jpg"`
> >   >do
> >   >mutt -a $each -s "your subject" to_address < /dev/null
> >   >done
> > This will recursively go through the present working directory, and email
> > all jpgs as attachments to the email address replacing 'to_address'.  This
> > will send them one-by-one though.
>
> Yes, this helps Marco. Thanks for showing me how it's done. One by one is
> exactly how I want the photos sent since there's usually between 100 and
> 200 to be sent at a time. (It's a real time consuming pain trying to send
> them manually.) Here's what I have now:
>
>         #!/bin/bash
>         cd /home/russ/qym.vet.pics
>         for each in `find . -name "*.jpg"`
>         do
>         mutt -a $each -s "QYM Veterans Day Photo" $1 \
>                 < /home/russ/qym.docs/qym.photo.vet.txt
>         done
>
> (Note that the 5th line is wrapped here.) I call this script passing the
> recipient's email address on the command line, which will replace the `$1'.
> It does work quite well as shown above.
>         The next problem is this; besides needing to be able to email a
> whole bunch of photos manually, I'd like to expand upon this with a
> procmail recipe so that anyone foolish enough to want to get copies of all
> the photos will only need to send an email to me with a subject line of
> "send.qym.vet.pics", and then I want procmail to run the above shell script
> passing the requestor's email address to the shell script on the command
> line.
>         Using this technique I should be able to maintain several
> directories of event photos available to anyone upon an email request.
> Anyone know if it's possible to write a procmail recipe that can accomplish
> this?

I believe this is one of the features of procmail.  This snip is from infinite
inks site on procmail features
ftp://ftp.informatik.rwth-aachen.de/pub/packages/procmail/procmail.FEATURES

its a pretty good site for things procmail:
http://www.ii.com/internet/robots/procmail/

Feature summary for procmail:
        + It's less filling (i.e. small)
       [snip]
        + Provides a reliable hook (you might even say anchor :-) for any
          programs or shell scripts you may wish to start upon mail arrival
        [snip]



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to