Hi all,
my problem is that I want to send an e-mail every day, but when I try to
iterate, the unix perl wants to see all the iterations and then execute them
at once, while this isn't the same on windows. This means I can't send an
e-mail every day this way below:

#!usr/bin/perl
use warnings;
use CGI::Carp qw(fatalsToBrowser);

my $mailprogram = "/usr/lib/sendmail";
my $rec = '[EMAIL PROTECTED]';
my $i = 0;


while ($i < 300)

 open (MAIL,"|$mailprogram -t");
 print MAIL "To: $rec\n";
 print MAIL "From: Yasen_Petrov\n";
 print MAIL "Subject: Ads\n";
 print MAIL "Some text\n";
 sleep 60*60*24; # 24 hours
 close MAIL;
 $i++;
 print "Content-type: text/html\n\n";
 print "You have just send an e-mail to $rec\n";
}

If anyone can help, I'll be very grateful. Thanks.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to