diff options
author | Mark Wells <mark@freeside.biz> | 2016-12-13 16:40:05 -0800 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2016-12-13 16:40:05 -0800 |
commit | bd730ebd92b6c8f9d07d943dcb276e0c9cde3e30 (patch) | |
tree | 90b570cb821bc608ae20e7e204a57ffcb219a938 | |
parent | 99e45c99df978410140c0e14f17820d57f9e6b54 (diff) |
Un-revert "Format email addresses w/Email::Address ... RT#73241"
This reverts commit 99e45c99df978410140c0e14f17820d57f9e6b54.
-rw-r--r-- | FS/FS/cust_main.pm | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 7e1a25d23..0165bc479 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; |