diff options
Diffstat (limited to 'LedgerSMB/Mailer.pm')
-rw-r--r-- | LedgerSMB/Mailer.pm | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/LedgerSMB/Mailer.pm b/LedgerSMB/Mailer.pm index 7fd7f1fb..80ffebb8 100644 --- a/LedgerSMB/Mailer.pm +++ b/LedgerSMB/Mailer.pm @@ -35,6 +35,7 @@ package LedgerSMB::Mailer; +use Encode; use MIME::Lite; use MIME::Base64; use LedgerSMB::Sysconfig; @@ -63,11 +64,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}, |