[freeside-commits] branch FREESIDE_3_BRANCH updated. bf6d06efe903dfd4c112fb9eccb98344841b729c
Ivan
ivan at 420.am
Thu Nov 3 17:25:51 PDT 2016
The branch, FREESIDE_3_BRANCH has been updated
via bf6d06efe903dfd4c112fb9eccb98344841b729c (commit)
from e6b4ecab0e62de9da1bae4df0216e1b547f77f3d (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 bf6d06efe903dfd4c112fb9eccb98344841b729c
Author: Ivan Kohler <ivan at freeside.biz>
Date: Thu Nov 3 17:25:49 2016 -0700
Format email addresses w/Email::Address instead of ad-hoc, fixes issues emailing companies with commas, RT#73241
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm
index 7e1a25d..0165bc4 100644
--- a/FS/FS/cust_main.pm
+++ b/FS/FS/cust_main.pm
@@ -32,6 +32,7 @@ use Digest::MD5 qw(md5_base64);
use Date::Format;
#use Date::Manip;
use File::Temp; #qw( tempfile );
+use Email::Address;
use Business::CreditCard 0.28;
use FS::UID qw( getotaker dbh driver_name );
use FS::Record qw( qsearchs qsearch dbdef regexp_sql );
@@ -3571,15 +3572,17 @@ sub contact_list_email {
# unlike on 4.x, we have a separate list of invoice email
# destinations.
# make sure they're not redundant with contact emails
- my $dest = $contact->firstlast . ' <' . $contact_email->emailaddress . '>';
- $emails{ $contact_email->emailaddress } = $dest;
+ $emails{ $contact_email->emailaddress } =
+ Email::Address->new( $contact->firstlast,
+ $contact_email->emailaddress
+ )->format;
}
}
}
if ( $and_invoice ) {
foreach my $email ($self->invoicing_list_emailonly) {
- my $dest = $self->name_short . ' <' . $email . '>';
- $emails{ $email } ||= $dest;
+ $emails{ $email } ||=
+ Email::Address->new( $self->name_short, $email )->format;
}
}
values %emails;
-----------------------------------------------------------------------
Summary of changes:
FS/FS/cust_main.pm | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
More information about the freeside-commits
mailing list