Guest_imported
New member
- Jan 1, 1970
- 0
1) The script keeps on sending out blank emails that have not sender, recepient, date, or anything!
2) The script keeps on seeing to 'miss' emails being sent. E.g if I am meant to send out 12, it will send out 10. There does not seem to be a patter to the ones it misses out
The code is;
and the content of months.ace is like 32
The content of dates.ace is;
I have been working on this all day, and I am still n closer to solving it
Could some one pleeeeeeeeeeese help me!
Thanks
Andy
2) The script keeps on seeing to 'miss' emails being sent. E.g if I am meant to send out 12, it will send out 10. There does not seem to be a patter to the ones it misses out

The code is;
Code:
#!/usr/bin/perl
print "Content-type: text/html \n\n";
$sendmail = "/usr/sbin/sendmail";
use CGI::Carp qw(fatalsToBrowser);
use CGI qw(:standard);
# Get the info we need.
# $query = new CGI;
# $sendthanks = $query->param('sendthanks');
open(MONTH,"months.ace") || die &error;
$month = <MONTH>;
close(MONTH);
open(MONTH,">months.ace") || die &error;
$new_month = $month + 1;
print MONTH "$new_month";
close(MONTH);
# Get the data
open(DATES,"dates.ace") || die &error;
flock(DATES, 2);
@dates = <DATES>;
close(DATES);
@send = qw();
foreach $person (@dates)
{
($username, $emailaddress, $exp_date) = split(/::/, $person);
if ($exp_date == $month)
{ push(@send, "$username\:\:$emailaddress");
}
} # End the foreach loop.
&add;
&admin_send;
sub add
{
foreach $line (@send)
{
my ($username, $email) = split(/::/, $line);
flock(MAIL, 2);
open(MAIL,"|$sendmail -t"); # || die &error;
print MAIL "To: $email \n";
print MAIL "From: support\@vgacd.com \n";
print MAIL "Reply-to: support\@vgacd.com \n";
print MAIL "Subject: RE\: Your membership for username \"$username\"..... \n\n";
close(MAIL);
print "sent $username <BR>\n";
} # End the foreach loop
}
sub admin_send
{
print "Sent email to admin";
}
sub error
{
print "<BR><BR>There was an error opening the file";
}
and the content of months.ace is like 32
The content of dates.ace is;
Code:
4andy::webmaster@ace-installer.com::29
4andy::webmaster@ace-installer.com::29
4andy::webmaster@ace-installer.com::29
4andy::webmaster@ace-installer.com::30
4andy::webmaster@ace-installer.com::30
4andy::webmaster@ace-installer.com::30
4andy::webmaster@ace-installer.com::31
4andy::webmaster@ace-installer.com::31
4andy::webmaster@ace-installer.com::31
4andy::webmaster@ace-installer.com::32
4andy::webmaster@ace-installer.com::32
4andy::webmaster@ace-installer.com::32
4andy::webmaster@ace-installer.com::33
4andy::webmaster@ace-installer.com::33
4andy::webmaster@ace-installer.com::33
4andy::webmaster@ace-installer.com::34
4andy::webmaster@ace-installer.com::34
4andy::webmaster@ace-installer.com::34
1andy::webmaster@ace-installer.com::35
2andy::webmaster@ace-installer.com::35
3andy::webmaster@ace-installer.com::35
1andy::webmaster@ace-installer.com::35
2andy::webmaster@ace-installer.com::35
3andy::webmaster@ace-installer.com::35
1andy::webmaster@ace-installer.com::35
2andy::webmaster@ace-installer.com::35
3andy::webmaster@ace-installer.com::35
1andy::webmaster@ace-installer.com::35
2andy::webmaster@ace-installer.com::35
3andy::webmaster@ace-installer.com::35
4andy::webmaster@ace-installer.com::36
4andy::webmaster@ace-installer.com::36
4andy::webmaster@ace-installer.com::36
4andy::webmaster@ace-installer.com::36
I have been working on this all day, and I am still n closer to solving it

Could some one pleeeeeeeeeeese help me!
Thanks
Andy