【问题标题】:Missing TCL package smtp缺少 TCL 包 smtp
【发布时间】:2011-09-09 01:46:30
【问题描述】:

我正在使用我认为应该在默认安装中包含 smtp 的 activestate TCL。

但是,当我运行以下示例时(来自文档):

proc send_simple_message {recipient email_server subject body} {
    package require smtp
    package require mime
    set token [mime::initialize -canonical text/plain \\
    -string $body]
    mime::setheader $token Subject $subject
    smtp::sendmessage $token \\
    -recipients $recipient -servers $email_server
    mime::finalize $token
}
send_simple_message someone@somewhere.com localhost \\
    "This is the subject." "This is the message."

我收到以下错误:

can't find package smtp

我需要做些什么来启用 Activestate TCL 中的包吗?

【问题讨论】:

    标签: scripting smtp tcl


    【解决方案1】:

    使用 teacup 从 ActiveState 存储库安装 smtp 包 -

    c:\> teacup install smtp
    Resolving smtp ...   (etc)
    

    【讨论】:

    • 工作了,但是在 Mac OSX 版本的 TCL 上工作的脚本仍然没有处于活动状态! :( 它冻结在“正在尝试 smtp.gmail.com...”
    猜你喜欢
    • 1970-01-01
    • 2021-12-26
    • 1970-01-01
    • 1970-01-01
    • 2015-11-22
    • 1970-01-01
    • 1970-01-01
    • 2014-03-28
    • 1970-01-01
    相关资源
    最近更新 更多