X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/77733865782a76d067540b70304ff3dab7a1ab8c..48399a5a2938079361780de1e87e15e6dbbca349:/SL/Mailer.pm diff --git a/SL/Mailer.pm b/SL/Mailer.pm index e9665caac..1cf519b60 100644 --- a/SL/Mailer.pm +++ b/SL/Mailer.pm @@ -131,7 +131,7 @@ sub send { } my $headers = ''; - foreach my $item (qw(from to cc)) { + foreach my $item (qw(from to cc bcc)) { next unless ($self->{$item}); my (@addr_objects) = Email::Address->parse($self->{$item}); next unless (scalar @addr_objects); @@ -194,7 +194,15 @@ $self->{message} } print OUT qq|--${boundary} -Content-Type: $application/$self->{format}; name="$filename"; charset="$self->{charset}" +Content-Type: $application/$self->{format}; name="$filename"; |; + + # only set charset for attachements of type text. every other type should not have this field + # refer to bug 883 for detailed information + if ($application eq 'text' && $self->{charset}) { + print OUT qq|charset="$self->{charset}" |; + } + + print OUT qq| Content-Transfer-Encoding: BASE64 Content-Disposition: attachment; filename="$filename"\n\n|;