使用tcl的smtp sendmessage在windows上不起作用,无法打开crypt.dll

使用tcl的smtp sendmessage在windows上不起作用,无法打开crypt.dll,smtp,tcl,sendmessage,Smtp,Tcl,Sendmessage,我试图用这段代码发送一封带有TCL 8.6附件的电子邮件。虽然此代码在linux中可与附件一起工作,但在windows上尝试附加文件时会出现以下消息 400:无法打开crypt.dll消息。 在windows 7、8.1和10上试用。有什么想法吗?我感谢你的帮助。 谷歌没有给出任何关于crypt.dll的有用提示 package require tls package require smtp package require mime proc send_email {to subject b

我试图用这段代码发送一封带有TCL 8.6附件的电子邮件。虽然此代码在linux中可与附件一起工作,但在windows上尝试附加文件时会出现以下消息 400:无法打开crypt.dll消息。 在windows 7、8.1和10上试用。有什么想法吗?我感谢你的帮助。 谷歌没有给出任何关于crypt.dll的有用提示

package require tls
package require smtp
package require mime

proc send_email {to subject body { attachment ""} } {
    set opts {}

    lappend opts -servers "smtp.something.com"
    lappend opts -ports 587
    lappend opts -username "someone@something.com"
    lappend opts -password "password"
    lappend opts -header [list "Subject" $subject]
    lappend opts -header [list "From" "xyz@gmail.com"]
    lappend opts -header [list "To" $to]

    if { $attachment == "" } {
        set mime_msg [mime::initialize -canonical "text/plain" -string $body]
    } else {
        set textT    [mime::initialize -canonical text/plain -string $body]
        set attT     [mime::initialize -canonical "name=\"[file tail $attachment]\"" -file $attachment]
        set mime_msg [mime::initialize -canonical multipart/mixed -parts [ list $textT $attT ]]
    }

    smtp::sendmessage $mime_msg {*}$opts -usetls 1
    mime::finalize $mime_msg -subordinates all
}

“tls”包需要crypt.dll。您的系统上是否安装了openssl或libressl?或者您安装的“tls”软件包是否包含这些库tls需要能够找到它们。Windows要求要加载的.dll文件的位置在PATH环境变量中;这是一个非常著名且与TLS Windows API相关的示例。显然地(我不是这方面的专家。)不,这条消息显然是说crypt.dll。这是activesatte tcl 8.6.9。嗯,“tls”包需要crypt.dll。您的系统上是否安装了openssl或libressl?或者您安装的“tls”软件包是否包含这些库tls需要能够找到它们。Windows要求要加载的.dll文件的位置在PATH环境变量中;这是一个非常著名且与TLS Windows API相关的示例。显然地(我不是这方面的专家。)不,这条消息显然是说crypt.dll。这是ActiveSATETTCL8.6.9。