Hi all,

I am trying to send an email to users based on a list of emails that have
been read into an array. The array contains about 600 records but it abends
at around 200. 

Here is the error message from the error log

[21/May/2001:14:47:40] failure (  746): for host 10.416.87.26 trying to POST
/to
ols/email.cgi, cgieng_scan_headers reports: the CGI program
/usr/admin/reports/cgi-bin/email.cgi.cgi did not produce a valid header (too
many headers from CGI  script (max 200))  


Here is the code I am using :

        my @email = ();                         # the email array
        foreach $rec (@records) {
                next if $rec =~ /^"Registrant_ID"/;
                if ($rec =~ /^$ID/) {
                        # We have found the right record; split fields
                        $rec =~ s/\r//g;                # remove stupid DOS
line-end
                        chomp($rec);                    # remove LF
                        ($name,$addr,$city,$state,$zip,$email) = split
/##/, $rec;
                        push @email, $email;
                }
        }



                foreach my $email_address (@email) {
                open (MAIL, "| /usr/opt/sendmail -oi -t -X
/var/tmp/sendmail_email.log") || display_error("Mail
error", "Can't open sendmail $!");
                print MAIL "To: $email_address\n";
                print MAIL "From: $from\n";
                print MAIL "Cc: \n";
                    print MAIL "Subject: $subject_message\n\n";
                print MAIL "$email_text\n";
                close (MAIL) || display_error("Mail error", "Can't close
sendmail $!");
                        }



Any ideas on the cause of the problem would  greatly appreciated,

Regards,
Mike Stussie


***************************************************************************************
WARNING:  All e-mail sent to and from this address will be received or
otherwise recorded by the A.G. Edwards corporate e-mail system and is
subject to archival, monitoring or review by, and/or disclosure to,
someone other than the recipient.
***************************************************************************************

Reply via email to