Revision f8361ca6
Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt
SL/Mailer.pm | ||
---|---|---|
83 | 83 |
sub _create_address_headers { |
84 | 84 |
my ($self) = @_; |
85 | 85 |
|
86 |
# $self->{addresses} collects the recipients for use in e.g. the |
|
87 |
# SMTP 'RCPT TO:' envelope command. $self->{headers} collects the |
|
88 |
# headers that make up the actual email. 'BCC' should not be |
|
89 |
# included there for certain transportation methods (SMTP). |
|
90 |
|
|
86 | 91 |
$self->{addresses} = {}; |
87 | 92 |
|
88 | 93 |
foreach my $item (qw(from to cc bcc)) { |
89 | 94 |
$self->{addresses}->{$item} = []; |
90 |
next if !$self->{$item} || $self->{driver}->keep_from_header($item);
|
|
95 |
next if !$self->{$item}; |
|
91 | 96 |
|
92 | 97 |
my @header_addresses; |
93 | 98 |
|
94 | 99 |
foreach my $addr_obj (Email::Address->parse($self->{$item})) { |
95 | 100 |
push @{ $self->{addresses}->{$item} }, $addr_obj->address; |
101 |
next if $self->{driver}->keep_from_header($item); |
|
102 |
|
|
96 | 103 |
my $phrase = $addr_obj->phrase(); |
97 | 104 |
if ($phrase) { |
98 | 105 |
$phrase =~ s/^\"//; |
Auch abrufbar als: Unified diff
E-Mail-Versand via SMTP: BCC-Feld in 'RCPT TO:' mitsenden
Fixt #2285.