This is a very basic approach that will send a text
message to everyone in your flat file:
## This isn't tested ;-)
$message = "What I want to say goes here for the
body.";
open (SENDMAIL,"|/usr/lib/sendmail -t");
open (EMIAL, "myFlatFile") or die "Can't open file:
$!\n";
# Read each email address in and send it out one at a
time.
while( $email = <EMAIL> ) {
print SENDMAIL "To: $email\n";
print SENDMAIL "From: You\n";
print SENDMAIL "Subject: Whatever you want\n\n";
print SENDMAIL $message;
}
close (EMAIL);
close (SENDMAIL);
--- lonh SENG <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I am beginner of perl and unix system.
> I have a flat file containing email address.
> I want to send the same message to those guys in
> the flat file.
> Could anyone help me?
>
> Thank you in advance,
>
>
> Best Regards,
> lonh
>
>
__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com
_______________________________________________
Perl-Unix-Users mailing list. To unsubscribe go to
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users