getting xargs and mail to play nicely
Peter King
peter.king-H217xnMUJC0sA/PxXw9srA at public.gmane.org
Wed Jun 15 02:57:43 UTC 2005
I want to do a (legitimate!) mailing of a single message to several
recipients, and I'd like each to be the sole recipient specified in
the email -- so no multiple addresses, cc, bcc, or suchlike. I have
the recipients' addresses in a single text file, with one address per
line in the file.
How can I do a "mass mailing"?
Why xargs, I thought, just grep through the address file and feed it
to mail, and redirect the message:
% grep @ addressfile | xargs -n1 mail -s SUBJECT < messagefile
But this doesn't work: mail tries to take addresses from messagefile,
not from addressfile. If I leave off the messagefile, then I send nice
cheerful null emails to each person listed in addressfile.
What am I missing here? Sorry to be clueless!
--
Peter King peter.king-H217xnMUJC0sA/PxXw9srA at public.gmane.org
Department of Philosophy
215 Huron Street
The University of Toronto (416)-978-3788 ofc
Toronto, ON M5S 1A1
CANADA
http://individual.utoronto.ca/pking/
=========================================================================
GPG keyID 0x7587EC42 (2B14 A355 46BC 2A16 D0BC 36F5 1FE6 D32A 7587 EC42)
gpg --keyserver pgp.mit.edu --recv-keys 7587EC42
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
URL: <http://gtalug.org/pipermail/legacy/attachments/20050614/f80c458a/attachment.sig>
More information about the Legacy
mailing list