我正在使用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 someone@somewhere.com localhost \\
"This is the subject." "This is the message."
我收到以下错误:
can't find package smtp
在Activestate TCL中启用软件包是否需要做些什么?
答案 0 :(得分:4)
使用teacup
-
c:\> teacup install smtp
Resolving smtp ... (etc)