On Mon, 27 Jan 2003, Scott, Deborah wrote: > Date: Mon, 27 Jan 2003 16:54:28 -0600 > From: "Scott, Deborah" <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: RE: Email function question > > > > The above file works great on my NT server.... but how do I send it to > multiple people? I've tried turning the addressee string into an array, in > multiple ways. An example is the following: > > @addressee=("joe_employee\@my.com","jane_employee\@your.com"); > foreach $i (@addressee) { > open(MAIL, "|$file $addressee") || die "can't open sendmail"; > print MAIL "To: $addressee\n" ; > print MAIL "From: tom_employee\n" ; > print MAIL "Subject: Email Message\n\n" ; > > > AND THEN I've put the closing brackets in multiple places... but I get the > error that NO RECIPIENT is specified. Sent to dead letter file. > To make this work, you have to specify the list variable ($i):
foreach $i (@addressee) { open(MAIL, "|$file $addressee") || die "can't open sendmail"; print MAIL "To: $i\n" ; print MAIL "From: tom_employee\n" ; print MAIL "Subject: Email Message\n\n" ; } Btw, can I sugges the Mail::Sendmail module? =) jab -------- Be straight and to the point. Don't waste others' time. Do your homework before you ask for help. --Unknown -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]