Ticket #30613: Can't Send E-mail
[freeside.git] / FS / FS / cust_main / Billing_Realtime.pm
index 330a454..f9f3754 100644 (file)
@@ -1109,7 +1109,10 @@ sub _realtime_bop_result {
         };
 
         my $error = send_email(
-          'from'    => $conf->config('invoice_from', $self->agentnum ),
+          'from'    => $conf->config('invoice_from_name', $self->agentnum ) ?
+                       $conf->config('invoice_from_name', $self->agentnum ) . ' <' .
+                       $conf->config('invoice_from', $self->agentnum ) . '>' :
+                       $conf->config('invoice_from', $self->agentnum ),
           'to'      => [ grep { $_ ne 'POST' } $self->invoicing_list ],
           'subject' => 'Your payment could not be processed',
           'body'    => [ $template->fill_in(HASH => $templ_hash) ],