projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT#71513: Card tokenization [v3 bug fixes]
[freeside.git]
/
FS
/
FS
/
Misc.pm
diff --git
a/FS/FS/Misc.pm
b/FS/FS/Misc.pm
index
164f1ba
..
eedc736
100644
(file)
--- a/
FS/FS/Misc.pm
+++ b/
FS/FS/Misc.pm
@@
-252,12
+252,21
@@
sub send_email {
$smtp_opt{'ssl'} = 1 if defined($enc) && $enc eq 'tls';
$transport = Email::Sender::Transport::SMTP->new( %smtp_opt );
}
$smtp_opt{'ssl'} = 1 if defined($enc) && $enc eq 'tls';
$transport = Email::Sender::Transport::SMTP->new( %smtp_opt );
}
-
+
push @to, $options{bcc} if defined($options{bcc});
push @to, $options{bcc} if defined($options{bcc});
+ # make sure
+ my @env_to = split(/\s*,\s*/, join(', ', @to));
+ # strip display-name from envelope addresses
+ foreach (@env_to) {
+ s/^\s*//;
+ s/\s*$//;
+ s/^(.*)\s*<(.*@.*)>$/$2/;
+ }
+
local $@; # just in case
eval { sendmail($message, { transport => $transport,
from => $from,
local $@; # just in case
eval { sendmail($message, { transport => $transport,
from => $from,
- to => \@to }) };
+ to => \@
env_
to }) };
my $error = '';
if(ref($@) and $@->isa('Email::Sender::Failure')) {
my $error = '';
if(ref($@) and $@->isa('Email::Sender::Failure')) {