Changeset 1781

Show
Ignore:
Timestamp:
10/19/06 16:12:29
Author:
miyagawa
Message:

Publish::Gmail allows encodings other than utf-8

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/lib/Plagger/Plugin/Publish/Gmail.pm

    r1734 r1781  
    8686    $msg->replace("X-Mailer" => "Plagger/$Plagger::VERSION"); 
    8787 
     88    my $encoding = $self->conf->{encoding} || 'utf-8'; 
    8889    $msg->attach( 
    89         Type => 'text/html; charset=utf-8'
    90         Data => encode("utf-8", $body), 
     90        Type => "text/html; charset=$encoding"
     91        Data => encode($encoding, $body, Encode::FB_HTMLCREF), 
    9192        Encoding => 'quoted-printable', 
    9293    );