diff options
author | Ivan Kohler <ivan@freeside.biz> | 2017-06-30 14:23:02 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2017-06-30 14:23:02 -0700 |
commit | 79a7bf5a7dc369181849e4a0771b0c4d2d722d1c (patch) | |
tree | de75b95462df1abea3a7446c7f92f658fcc4299f | |
parent | e467098604e3d6038d666214bc1a3f5d2a6f44eb (diff) |
fix outgoing email with commas in company name, RT#76449
-rw-r--r-- | FS/FS/Conf.pm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 639a9ecbf..b58069fe0 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 |