+# Now I need to send failure EMAIL
+
+foreach my $agentnum ( keys %agent_failure_body ) {
+
+ $mail_sender = $conf->config('invoice_from', $agentnum )
+ if $conf->exists('invoice_from', $agentnum);
+ $failure_recipient = $conf->config('invoice_from', $agentnum)
+ if $conf->exists('invoice_from', $agentnum);
+
+ $ENV{MAILADDRESS} = $mail_sender;
+ my $header = new Mail::Header ( [
+ "From: Account Processor",
+ "To: $failure_recipient",
+ "Sender: $mail_sender",
+ "Reply-To: $mail_sender",
+ "Subject: Unnotified Billing Arrangement Expirations",
+ ] );
+