#!/usr/local/bin/perl require "Lite.pm"; $address = "hgy.emllst"; # file with email addresses $email_template = "email-sept-20-06.html"; # the 'email' in html format (looks pretty) $subject = "News for September 2006"; open(E,$email_template); @F = ; close(E); $filehtml = join("",@F); ## open up the file with the email addresses open(A,$address) || die "could not open $address for reading\n"; ## read in the email addresses into the address array @addresses = ; ## for each address in the list for ($i=0; $i < @addresses; $i++) { if ($addresses[$i] ne "") { ## send the customer an email my $msg = MIME::Lite->new( From =>'news@xxxxxxxx.com', To =>"$addresses[$i]", Subject =>"$subject", Type =>'text/html', Data =>"$filehtml"); $msg->send(); } }