[freeside-commits] branch master updated. f21ba2add822ca502b1e66b27a30c4404f97c35e

Ivan ivan at 420.am
Fri Jun 30 14:22:59 PDT 2017


The branch, master has been updated
       via  f21ba2add822ca502b1e66b27a30c4404f97c35e (commit)
      from  60a758ffd673991869547bf57cba228d53ce6ef3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f21ba2add822ca502b1e66b27a30c4404f97c35e
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Fri Jun 30 14:22:57 2017 -0700

    fix outgoing email with commas in company name, RT#76449

diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index 5ba6fce..086448c 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -10,6 +10,7 @@ use IO::File;
 use File::Basename;
 use MIME::Base64;
 use Locale::Currency;
+use Email::Address;
 use FS::ConfItem;
 use FS::ConfDefaults;
 use FS::Locales;
@@ -542,10 +543,11 @@ defined, company_name), appropriately combined based on their current values.
 sub invoice_from_full {
   my ($self, $agentnum) = @_;
 
-  (    $self->config('invoice_from_name', $agentnum)
-    || $self->config('company_name', $agentnum)
-  ).
-  ' <'. $self->config('invoice_from', $agentnum ). '>';
+  my $name =  $self->config('invoice_from_name', $agentnum)
+           || $self->config('company_name', $agentnum);
+
+  Email::Address->new( $name => $self->config('invoice_from', $agentnum ) )
+    ->format;
 }
 
 =back

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/Conf.pm |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)




More information about the freeside-commits mailing list