Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git] / FS / FS / cust_pay.pm
index df567a5..e44278d 100644 (file)
@@ -694,7 +694,10 @@ sub send_receipt {
         'msgtype' => 'receipt',
       };
       $error = $queue->insert(
-        'from'    => $conf->config('invoice_from', $cust_main->agentnum),
+        'from'    => $conf->config('invoice_from_name', $cust_main->agentnum ) ?
+                     $conf->config('invoice_from_name', $cust_main->agentnum ) . ' <' .
+                     $conf->config('invoice_from', $cust_main->agentnum ) . '>' :
+                     $conf->config('invoice_from', $cust_main->agentnum ),
                                    #invoice_from??? well as good as any
         'to'      => \@invoicing_list,
         'subject' => 'Payment receipt',