in reply to Problem with russian / cyrillic in e-mail program.

my $msg = MIME::Lite->new( From => "=?UTF-8?B?" . encode_base64( 'Some russian + text', "" ) . "?=" . ' <inf@irkutsk.2gis.ru>', To => $email_address, Subject => "=?UTF-8?B?" . encode_base64( 'Some russian + text', "" ) . "?=", Type => 'multipart/mixed', ); $msg->attach( Type => 'text/html; charset=UTF-8', Data => $message_html, ); $msg->attach( Type => 'application/msword', Path => $base_path . '\\' . $dir_name . '\\' . $fi +le_name . ".doc", Filename => "=?UTF-8?B?" . encode_base64( 'Some russia +n text', "" ) . "?=" . '.doc', ); $msg->attr('content-type.charset' => 'UTF-8'); $msg->send;

Replies are listed 'Best First'.
Re^2: Problem with russian / cyrillic in e-mail program.
by dbmathis (Scribe) on Apr 04, 2010 at 03:40 UTC

    Hi, thanks for the post, I tried it like this and I am still getting the same mangled subject arriving in my inbox.

    #================================================================ #- Send info #================================================================ # sub send_info { # Adjust sender, recipient and your SMTP mailhos my $from_address = $from; my $to_address = $infoemail; # Adjust subject and body message my $message_body = "<h2>The following visitor requested informatio +n.</h2><b>Name:</b> $string<br><b>E-mail:</b> $email<br>"; my $subject = "$string is requesting information."; # Create the multipart container my $msg = MIME::Lite->new ( From => $from_address, To => $to_address, BCC => $bcc, Subject => "=?UTF-8?B?" . encode_base64 +( $subject, "" ) . "?=", Type =>'multipart/mixed' ) or die "Error creating multipart cont +ainer: $!\n"; # Add the text message part $msg->attach ( Type => 'text/html', Data => qq{ $message_body } ) or die "Error adding the text message part: $!\n"; # Now send $msg->attr('content-type.charset' => 'UTF-8'); $msg->send("sendmail") or die "Error e-mailing: $!\n"; }

      Are you sure your subject is UTF-8 encoded?