>>>>> "Alexander" == Alexander Else <[EMAIL PROTECTED]> writes:
Alexander> Quoting Tony Green <[EMAIL PROTECTED]>:
>> On 29/08/2005, at 9:49 AM, Alexander Else wrote: > Hi all,
>> >
>> > A task has been allocated to me to send out a mail (possibly with
>> a > word/pdf > attachment) to a few hundred email addresses in an
>> hour and a > half. As i don't > have a lot of time to do my
>> homework on this one, i hope someone > can point me to > one or two
>> options for a script that will do this for me.
>> >
>> > I know it's a pretty trivial task to write one but the limited
>> time > frame and > apparent urgency of it makes me want to just
>> pick one up and make > sure it works > for me before then, rather
>> than write my own and risk missing that > tiny-but-critical flaw.
>> >
>>
Surely if the message is identical for all of the recipients, then:
cat message | /usr/lib/sendmail -f '<from_address>' address1 address2
address3....
will do the trick.
If you have all the email addresses in a file, one per line, then
cat message | xargs -a address_file /usr/lib/sendmail -f '<from_address>'
will do it.
(Of course, the email addresses must be the simple bare [EMAIL PROTECTED]
form, no GECOS or brackets).
message must be a complete message with all headers, etc.
The easiest way to create one is to mail it to yourself, and save and
edit the result --- for example, to change the `To' line to something
sensible, and remove any `Received-by: ' headers.
--
Dr Peter Chubb http://www.gelato.unsw.edu.au peterc AT gelato.unsw.edu.au
The technical we do immediately, the political takes *forever*
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html