I have the following short script to send email. When I source it from
the command line in wish or tkcon, everything works fine. If I turn it
into a starpack using TclDevKit, I get error messages saying "key
message-id not in header" when I run it.
Anyone know how to resolve this?
I am using TclDevKit 3.2, tcllib 1.8, and Tcl 8.4.12 on WIndows XP.
Here is the code:
-----------------------------------------------------------------------------
package require mime
package req smtp
package req base64
package req md5
set from "..."
set to "..."
set subject "Test"
set date [clock format [clock seconds]]
# this does not seem to help anything
set ::smtp::trf 0
set token [mime::initialize -canonical text/plain -string "this is a
test"]
smtp::sendmessage $token \
-queue 0 \
-servers "..." \
-username "...." \
-password "...." \
-header [list From $from] \
-header [list Date $date] \
-header [list To $to] \
-header [list Subject "new test"] \
mime::finalize $token
-----------------------------------------------------------------------------------------------
Are you certain that you are getting the same set of libraries in both
settings? The starpack will only work off what's in its binary by
default, so that is often an area for variation.
Jeff
Hi Jeff,
That is exactly what I thought after a few days. I am using this:
package require mime
package req smtp
package req base64
package req md5
And in the starpack, I am including all these packages to be wrapped.
Apparently, this is not enough as the smtp does not work.
Looking at tcllib package code to determine all package dependencies
was a bit cumbersome; and I gave up on it. Is there a tool within
TclDevKit that does this? I am particularly interested in smtp and its
dependency tree.
> Jeff
If you use the "Scan" operation after loading in your script in TDK
TclApp, then it should recognize the dependencies.
Jeff