From: Moritz Bunkus Date: Mon, 3 Jun 2013 07:08:41 +0000 (+0200) Subject: E-Mail-Versand via SMTP: BCC-Feld in 'RCPT TO:' mitsenden X-Git-Tag: release-3.1.0beta1~392 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=f8361ca6dcd74bc833183eee2110c3eb49a343d7;p=kivitendo-erp.git E-Mail-Versand via SMTP: BCC-Feld in 'RCPT TO:' mitsenden Fixt #2285. --- diff --git a/SL/Mailer.pm b/SL/Mailer.pm index 2857e1c75..6c7a20111 100644 --- a/SL/Mailer.pm +++ b/SL/Mailer.pm @@ -83,16 +83,23 @@ sub _create_message_id { sub _create_address_headers { my ($self) = @_; + # $self->{addresses} collects the recipients for use in e.g. the + # SMTP 'RCPT TO:' envelope command. $self->{headers} collects the + # headers that make up the actual email. 'BCC' should not be + # included there for certain transportation methods (SMTP). + $self->{addresses} = {}; foreach my $item (qw(from to cc bcc)) { $self->{addresses}->{$item} = []; - next if !$self->{$item} || $self->{driver}->keep_from_header($item); + next if !$self->{$item}; my @header_addresses; foreach my $addr_obj (Email::Address->parse($self->{$item})) { push @{ $self->{addresses}->{$item} }, $addr_obj->address; + next if $self->{driver}->keep_from_header($item); + my $phrase = $addr_obj->phrase(); if ($phrase) { $phrase =~ s/^\"//;