projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
837e546
)
fix outgoing email with commas in company name, RT#76449
author
Ivan Kohler
<ivan@freeside.biz>
Fri, 30 Jun 2017 21:23:06 +0000
(14:23 -0700)
committer
Ivan Kohler
<ivan@freeside.biz>
Fri, 30 Jun 2017 21:23:06 +0000
(14:23 -0700)
FS/FS/Conf.pm
patch
|
blob
|
history
diff --git
a/FS/FS/Conf.pm
b/FS/FS/Conf.pm
index
07042e5
..
1fe11a0
100644
(file)
--- 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 IO::File;
use File::Basename;
use MIME::Base64;
+use Email::Address;
use FS::ConfItem;
use FS::ConfDefaults;
use FS::Conf_compat17;
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) = @_;
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
}
=back