Reputation: 5322
I'm using activestate TCL which I thought was suppose to include smtp in the default install.
However when I run the following example (From the documentation):
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 [email protected] localhost \\
"This is the subject." "This is the message."
I get the following error:
can't find package smtp
Is there something I have to do to enable the package in Activestate TCL?
Upvotes: 2
Views: 975
Reputation: 10582
Install the smtp package from the ActiveState repository with teacup
-
c:\> teacup install smtp
Resolving smtp ... (etc)
Upvotes: 4