Ticket #30613: Can't Send E-mail
[freeside.git] / FS / FS / cust_bill.pm
index bcfbbc7..6ded57f 100644 (file)
@@ -1085,6 +1085,9 @@ sub email {
 
   # this is where we set the From: address
   $from ||= $self->_agent_invoice_from ||    #XXX should go away
+            $conf->config('invoice_from_name', $self->cust_main->agentnum ) ?
+            $conf->config('invoice_from_name', $self->cust_main->agentnum ) . ' <' .
+            $conf->config('invoice_from', $self->cust_main->agentnum ) . '>' :
             $conf->config('invoice_from', $self->cust_main->agentnum );
 
   my @invoicing_list = $self->cust_main->invoicing_list_emailonly;