SLUG Mailing List Archives
Re: [SLUG] bulk mail script
- To: Alexander Else <aelse@xxxxxxxxxxxx>
- Subject: Re: [SLUG] bulk mail script
- From: Peter Chubb <peterc@xxxxxxxxxxxxxxxxxx>
- Date: Mon, 29 Aug 2005 11:12:54 +1000
- Cc: Tony Green <tgreen@xxxxxxxxxxx>, "slug@xxxxxxxxxxx" <slug@xxxxxxxxxxx>
- Comments: Hyperbole mail buttons accepted, v04.18.
>>>>> "Alexander" == Alexander Else <aelse@xxxxxxxxxxxx> writes:
Alexander> Quoting Tony Green <tgreen@xxxxxxxxxxx>:
>> 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 xxx@xxxxxxx
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*