summaryrefslogtreecommitdiff
path: root/LedgerSMB/Mailer.pm
diff options
context:
space:
mode:
Diffstat (limited to 'LedgerSMB/Mailer.pm')
-rwxr-xr-xLedgerSMB/Mailer.pm7
1 files changed, 2 insertions, 5 deletions
diff --git a/LedgerSMB/Mailer.pm b/LedgerSMB/Mailer.pm
index 0e14c8f4..32d16ab3 100755
--- a/LedgerSMB/Mailer.pm
+++ b/LedgerSMB/Mailer.pm
@@ -35,6 +35,7 @@
package Mailer;
+use Encode;
use MIME::Lite;
use MIME::Base64;
use LedgerSMB::Sysconfig;
@@ -66,11 +67,7 @@ sub send {
$h{$_} = $self->{$_};
}
- $h{subject} =
- ( $self->{subject} =~ /([\x00-\x1F]|[\x7B-\xFFFF])/ )
- ? "Subject: =?$self->{charset}?B?"
- . MIME::Base64::encode( $self->{subject}, "" ) . "?="
- : "Subject: $self->{subject}";
+ $h{subject} = "Subject: ".Encode::encode('MIME-Header', $self->{subject});
my $msg = MIME::Lite->new(
'From' => $self->{from},