diff options
author | Mark Wells <mark@freeside.biz> | 2016-01-28 22:02:08 -0800 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2016-01-28 22:02:08 -0800 |
commit | b56b12ca1d695efb26e61887499b1f8035ee0301 (patch) | |
tree | 6e5e554b4779424b0cd542c15e2cf531217dfbb7 | |
parent | aea97dbd5c5ac96c4610b112e55f64da66028ef6 (diff) |
correctly split Bcc addresses before trying to send, #39746
-rw-r--r-- | FS/FS/Misc.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/FS/FS/Misc.pm b/FS/FS/Misc.pm index 164f1baf4..e425c4a4b 100644 --- a/FS/FS/Misc.pm +++ b/FS/FS/Misc.pm @@ -252,12 +252,14 @@ sub send_email { $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}); + # make sure + my @env_to = split(/\s*,\s*/, join(', ', @to)); 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')) { |