On Tue, Mar 19, 2002 at 10:35:30AM -0500, [EMAIL PROTECTED] wrote: > Is there a way in Mutt to specify the To: field of an outgoing email > based on addresses in a random text file? I'm aware of the alias capability to > specify mailing lists, but if I simply have a file of email addresses, and I'd > like Mutt to use those for an outgoing message, is there a simple way to > accomplish that?
In the spirit of 'many ways to skin a cat', I attach my 'mail_to_list' Perl script. It uses 'mail', but you could hack it to use 'mutt'. It may not be the most elegant/efficient way, but I think it works. -- David Smith Work Email: [EMAIL PROTECTED] STMicroelectronics Home Email: [EMAIL PROTECTED] Bristol, England
eval "exec $PERL -w $0 $*" # Magic to invoke perl on this script if $untrue; # using the environment variable PERL. $message_filename = shift; $subject_filename = shift; open(SUBJECT_FILE, $subject_filename); $subject = <SUBJECT_FILE>; close (SUBJECT_FILE); chop $subject; while ($address = <>) { chop $address; open (MAIL_COMMAND, "|mail -s $subject $address"); open (MESSAGE_FILE, $message_filename); while (<MESSAGE_FILE>) { print MESSAGE_FILE; } close MAIL_COMMAND; close MESSAGE_FILE; }