[freeside-commits] branch FREESIDE_3_BRANCH updated. 76efbc5d717233b0cd55130c9938d43b2398dc5c
Ivan
ivan at 420.am
Fri Jun 30 14:23:09 PDT 2017
The branch, FREESIDE_3_BRANCH has been updated
via 76efbc5d717233b0cd55130c9938d43b2398dc5c (commit)
from 837e546a78f18c57a228f946215af7ee8a6a00eb (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 76efbc5d717233b0cd55130c9938d43b2398dc5c
Author: Ivan Kohler <ivan at freeside.biz>
Date: Fri Jun 30 14:23:06 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 07042e5..1fe11a0 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -9,6 +9,7 @@ use Carp;
use IO::File;
use File::Basename;
use MIME::Base64;
+use Email::Address;
use FS::ConfItem;
use FS::ConfDefaults;
use FS::Conf_compat17;
@@ -605,10 +606,12 @@ based on their current values.
sub invoice_from_full {
my ($self, $agentnum) = @_;
- return $self->config('invoice_from_name', $agentnum ) ?
- $self->config('invoice_from_name', $agentnum ) . ' <' .
- $self->config('invoice_from', $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 | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
More information about the freeside-commits
mailing list