Re: sending files from the cmd line...

"Bruce A. Mah" <[email protected]>
Newsgroups gmane.mail.exmh.devel
Message-ID <[email protected]>
If memory serves me right, Anders Eriksson wrote:

> > I may be extra dense this morning but I'm not following the 
> > question.  Are you looking for an nmh command line way to mail a 
> > text file or a binary file?  Or an exmh way?
> > 
> > If you're looking for an nmh way does it have to be 
> > non-interactive so it can be embedded in a script or is 
> > interactive OK?
> > 
> 
> I'd like to have it non-interactive so I can script it to 
> send a bunch of files..
> 
> for f in * ; do
> uuencode $f $f | mail -s $f foo@bar
> done
> 
> short non-interactive, does the job kind of. Though many modern
> mailers can handle uuencode as well as mime, I'm a bit reluctant to
> send uuencoded stuff to folks whose computer skills are unknownv to
> me.
> 
> So I need to go mime, but I haven't found an equivalent script thing.

I've been looking for something similar too (for a slightly different
application).  This gets us partway there...create an appropriate
forwcomps file (perhaps generate one dynamically from a script, one that
takes a recipient's email address), and then:

% echo "send" | \
  forw -mime -form path/to/forwcomps -noedit -file path/to/file

Ugly but maybe the ugliness can be hidden away in a script.

Bruce.
signature.asc (application/pgp-signature, 223 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)
Comment: Exmh version 2.5+ 20020506

iD8DBQFASLE82MoxcVugUsMRAuI0AKCFJLeBf4UlMM6tjd6PzOYXiceFxwCfZryo
L9wot7A8mzvNO7L/zXAKlg4=
=LVaR
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.