From: Ivan Kohler Date: Fri, 30 Jun 2017 21:22:57 +0000 (-0700) Subject: fix outgoing email with commas in company name, RT#76449 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=f21ba2add822ca502b1e66b27a30c4404f97c35e fix outgoing email with commas in company name, RT#76449 --- diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 5ba6fce69..086448cff 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