in reply to Problem with UTF-8 email
I use this code to send russian emails:
use MIME::Lite; use MIME::Base64; #MIME::Lite->send( 'smtp', '192.168.0.22', AuthUser => "ki +njo", AuthPass => "password", Debug => 0 ); MIME::Lite->send( 'smtp', '192.168.0.22', Debug => 0 ); my $fr_title = encode( 'MIME-Header', $from_title ); my $msg = MIME::Lite->new( From => qq{"$fr_title" <$from_address>}, To => qq{<$email_address>}, Subject => encode( 'MIME-Header', $message_subject ), Type => 'multipart/related', ); $msg->attach( Type => 'text/html; charset=UTF-8', Data => $message_html, ); my $attachment_name = encode( 'MIME-Header', $attachment_t +itle . ".doc" ); #my $attachment_title_temp = $attachment_title; $msg->attach( Type => 'application/msword', Path => $base_path . '\\' . $dir_name . '\\' . $fi +le_name . ".doc", Filename => $attachment_name, ); $msg->attr('content-type.charset' => 'UTF-8'); $msg->send;
|
|---|