


nsmail has useful code.
SS http://www.hping.org/tclsbignum/imap4.tcl

More information can be found in imap4, I'm currently discussing with AK about future of the module.
http://groups.google.com/groups?q=dianna+mullet+group%3Acomp.lang.tcl*&hl=en&selm=a4u64k%243si%242%40srv38.cas.org&rnum=1


Or were you looking for iMap: an indexed map viewer?
[Explain the new client tcllib provides as of summer 2004.]
RFox - 2012-07-17 12:21:48One source of docs: http://docs.activestate.com/activetcl/8.5/tcllib/imap4/imap4.html

HolgerJ Unfortunately, as of today (2016-01-15), the imap4 module of Tcllib doesn't support appending do a mailbox. My application is putting new draft messages into the 'Drafts' folder of an IMAP account.Appending a new message to a folder works by sending tag APPEND Entw&APw-rfe {[string length $mail]}\r\n to the open channel. If it's ok, the server will reply a string beginning with '+ '. Then send the mail content of length [string length $mail], the server will reply a string beginning with 'tag OK'. The 'tag' itself can by any short alphanumeric string and should be different for each command, like 'A001', 'A002' and so on.Sometimes, the 'Drafts' folder gets renamed to a folder with a local name like 'Entwürfe' in German, which is beyond the ASCII range. There is a solution for this described in section 5.1.3 of RFC 3501. This is a procedure converting a mailbox named to the needed format, which is called 'modified utf-7':
proc imapMailboxName {s} { set status ASCII set utf7String "" set retval "" foreach ch [split $s ""] { if {$ch < " " || $ch > "\u007f"} { ;# special handling for chars below 32 and above 127 switch -- $status { ASCII { ;# beginning a new utf7String set status UTF7 set utf7String "\u0000$ch" } UTF7 { append utf7String "\u0000$ch" ;# appending to an existing utf7String } } } else { if {$utf7String != ""} { ;# a utf7String has to be converted append retval "&[string trimright [binary encode base64 "$utf7String"] =]-" set status ASCII set utf7String "" } ;# if append retval $ch } } ;# foreach if {$utf7String != ""} { ;# a utf7String has to be converted append retval "&[string trimright [binary encode base64 "$utf7String"] =]-" set status ASCII set utf7String "" } ;# if return $retval } ;# proc imapMailboxNameIn order to create a mailbox, the returning string can be used. In Thunderbird, you can examine the real name of folders by right-clicking on one and look at the properties.