#! /usr/bin/perl -w # #This program takes a list of email addresses and emails them. #NOTE: This program must be changed for each edition of the newsletter # use strict; use MIME::Lite; open(INDEX, " }; #Slurp the whole file in close(INDEX); my $msg = MIME::Lite->new( Subject =>'New phase of funding to support life-saving vaccines', Type =>'multipart/related', ); $msg->attach(Type =>'text/html', Data =>$body, Disposition=>'inline'); $msg->attach(Type =>'image/jpg', Path =>'index_files/Hivheader1.jpg', Disposition=>'inline'); $msg->attach(Type =>'image/jpg', Path =>'index_files/image001.jpg', Disposition=>'inline'); $msg->attach(Type =>'image/jpg', Path =>'index_files/image002.jpg', Disposition=>'inline'); $msg->attach(Type =>'image/gif', Path =>'index_files/image003.gif', Disposition=>'inline'); $msg->attach(Type =>'image/jpg', Path =>'index_files/image004.jpg', Disposition=>'inline'); $msg->attach(Type =>'image/jpg', Path =>'index_files/image005.jpg', Disposition=>'inline'); $msg->attach(Type =>'image/jpg', Path =>'index_files/image006.jpg', Disposition=>'inline'); while (<>) { $msg->add(To=>"$_"); $msg->send("sendmail","/usr/bin/qmail-inject"); }; #while there are more address on the command line