X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/38c19bfdc392dc369d77d612620fccc595a5f2af..de46c7042907923c9b88af67849dddab9a5101ba:/SL/Mailer.pm diff --git a/SL/Mailer.pm b/SL/Mailer.pm index 2cd3b4374..3cf205364 100644 --- a/SL/Mailer.pm +++ b/SL/Mailer.pm @@ -193,8 +193,15 @@ $self->{message} return "$attachment : $!"; } + # only set charset for attachements of type text. every other type should not have this field + # refer to bug 883 for detailed information + my $attachment_charset; + if (lc $application eq 'text' && $self->{charset}) { + $attachment_charset = qq|; charset="$self->{charset}" |; + } + print OUT qq|--${boundary} -Content-Type: $application/$self->{format}; name="$filename"; charset="$self->{charset}" +Content-Type: $application/$self->{format}; name="$filename"$attachment_charset Content-Transfer-Encoding: BASE64 Content-Disposition: attachment; filename="$filename"\n\n|;