Re: SMTP and russian language



This is working code:

set token [mime::initialize -canonical text/plain -string [encoding
convertto "Привет"]
set args [list -debug 0 -usetls 0 \
-servers "$server" -header [list From $sms_opt::smtpmail] \
-header [list Date $date] -header [list To $to] -header [list
Subject ""]]
if {[string length $login]} {lappend args -username $login}
if {[string length $pass]} {lappend args -password $pass}
if {[string length $port]} {lappend args -ports $port}
if {[catch {eval [linsert $args 0 smtp::sendmessage $token]} err]} {
tk_messageBox -message "$err" -title Error -icon error
}
mime::finalize $token

Thi is headers of mail:

MIME-Version: 1.0
Content-ID: <1344.1157011467.1@comp>
From: xxx
Date: Thu, 31 Aug 2006 12:04:27
To: xxx
Subject:
Message-ID: <1344.1157011467.2@comp>
Content-Type: text/plain

.