[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [1772] branches/1.2/LedgerSMB/Mailer.pm



Revision: 1772
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1772&view=rev
Author:   tetragon
Date:     2007-10-17 10:00:01 -0700 (Wed, 17 Oct 2007)

Log Message:
-----------
Switch subject encoding module from MIME::Base64 to encode (fixes 1815075)

Modified Paths:
--------------
    branches/1.2/LedgerSMB/Mailer.pm

Modified: branches/1.2/LedgerSMB/Mailer.pm
===================================================================
--- branches/1.2/LedgerSMB/Mailer.pm	2007-10-17 16:59:33 UTC (rev 1771)
+++ branches/1.2/LedgerSMB/Mailer.pm	2007-10-17 17:00:01 UTC (rev 1772)
@@ -35,6 +35,7 @@
 
 package Mailer;
 
+use Encode;
 use MIME::Lite;
 use MIME::Base64;
 use LedgerSMB::Sysconfig;
@@ -66,11 +67,7 @@
         $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},


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.