Link to home
Start Free TrialLog in
Avatar of webmommy
webmommy

asked on

email the contents of a txt file

while(<EMAILADDRESSFILE>)
{
   open MAIL, "|mail " . $_;
   print MAIL $heading . $quote;
   close MAIL;
}

I want  $heading . $quote;  to be changed to the contents of a text file.  In other words, I want to have a text file sitting in the directory this script is in, and have that text file contain the body of my mass email, so I would be able to write something like

while(<EMAILADDRESSFILE>)
{
   open MAIL, "|mail " . $_;
   print MAIL [a filename];
   close MAIL;
}

Help! I need a solution quick.
ASKER CERTIFIED SOLUTION
Avatar of ozo
ozo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial