$num_sent++;
my $boundary = time() . "-$$-${num_sent}";
$boundary = "kivitendo-$self->{version}-$boundary";
- my $domain = $self->recode($self->{from});
+ my $domain = $self->{from};
$domain =~ s/(.*?\@|>)//g;
my $msgid = "$boundary\@$domain";
foreach my $item (qw(to cc bcc)) {
next unless ($self->{$item});
- $self->{$item} = $self->recode($self->{$item});
$self->{$item} =~ s/\</</g;
$self->{$item} =~ s/\$<\$/</g;
$self->{$item} =~ s/\>/>/g;
$self->{$item} =~ s/\$>\$/>/g;
}
- $self->{from} = $self->recode($self->{from});
-
my %addresses;
my $headers = '';
foreach my $item (qw(from to cc bcc)) {
}
}
- $headers .= sprintf("Subject: %s\n", $self->mime_quote_text($self->recode($self->{subject}), 60));
+ $headers .= sprintf("Subject: %s\n", $self->mime_quote_text($self->{subject}, 60));
$driver->start_mail(from => $self->{from}, to => [ map { @{ $addresses{$_} } } qw(to cc bcc) ]);
$driver->print(qq|--${boundary}
Content-Type: $self->{contenttype}; charset="$self->{charset}"
-| . $self->recode($self->{message}) . qq|
+$self->{message}
|);
}
} else {
$driver->print(qq|Content-Type: $self->{contenttype}; charset="$self->{charset}"
-| . $self->recode($self->{message}) . qq|
+$self->{message}
|);
}
return $res;
}
-sub recode {
- my $self = shift;
- my $text = shift;
-
- return $::locale->is_utf8 ? Encode::encode('utf-8-strict', $text) : $text;
-}
-
1;