- #false laziness w/FS::cust_bill::send
- $ENV{MAILADDRESS} = $conf->config('invoice_from'); #??? well as good as any
- my $header = new Mail::Header ( [
- "From: $invoice_from",
- "To: ". $conf->config('deletepayments'),
- "Sender: $invoice_from",
- "Reply-To: $invoice_from",
- "Date: ". time2str("%a, %d %b %Y %X %z", time),
- "Subject: FREESIDE NOTIFICATION: Payment deleted",
- ] );
- my $message = new Mail::Internet (
- 'Header' => $header,
- 'Body' => [
+
+ my $error = send_email(
+ 'from' => $conf->config('invoice_from'), #??? well as good as any
+ 'to' => $conf->config('deletepayments'),
+ 'subject' => 'FREESIDE NOTIFICATION: Payment deleted',
+ 'body' => [