On Feb 13, 2006, at 01:13, Foo Ji-Haw wrote:

Hi all,

I'm trying to send out an email, that occasionally includes wide characters (possibly utf-8; the contents are downloaded from the Web). It looks like MIME::Lite does not like wide characters by default. Is there any way to get around it?

Below is my code snippet:

   my $mail = MIME::Lite->new (
       From=>$config->{SenderEmail},
       To=>$config->{email}->[0],
       Subject=>$config->{MailTitle},
       Type => 'multipart/alternative',
       );
   $mail->attach (
       Type=>'text/plain',
       Data=>'You need to see this in HTML-enabled mode',
       );
   $mail->attach (
       Type=>'text/html',
       Data=>$text,
       );
   $mail->send('smtp','localhost');


Try this:
        $mail->attach (
                Type=>'text/html; charset=utf-8',
                Data=>$text
                );
        $mail->send('smtp','localhost');

http://www.cpan.org/modules/by-module/MIME/MIME-Lite-2.117.readme

        dZ.

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to