scripting - 缺少 TCL 包 smtp

标签 scripting smtp tcl

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

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

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 <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="8af9e5e7efe5e4efcaf9e5e7effde2eff8efa4e9e5e7" rel="noreferrer noopener nofollow">[email protected]</a> localhost \\
    "This is the subject." "This is the message."

我收到以下错误:

can't find package smtp

我需要做什么才能在 Activestate TCL 中启用该软件包吗?

最佳答案

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

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

关于scripting - 缺少 TCL 包 smtp,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7351276/

相关文章:

python - Gmail 使用特定于应用程序的密码阻止来自 Python 的登录尝试

php - Gmail SMTP 问题

perl - 草莓 Perl : can't install Tcl module

tcl - 在输入框中显示文件名的尾部

bash - 如何grep字符的精确十六进制值

scripting - 如何查找已安装的 Windows 脚本宿主语言

linux - 获取 adb 日志并将其 grep 到 IF 语句中的字符串

sql-server-2008 - 搜索字符串变量然后在 PowerShell 中运行条件语句

python - 在Python中向通讯组列表发送电子邮件

unicode - 如何使Tcl_WriteChars支持Unicode?