Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

smtp and starpacks

3 views
Skip to first unread message

newtop...@yahoo.com

unread,
Mar 20, 2006, 11:00:33 AM3/20/06
to
Hello,


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
-----------------------------------------------------------------------------------------------

Jeff Hobbs

unread,
Apr 2, 2006, 11:52:19 PM4/2/06
to newtop...@yahoo.com
newtop...@yahoo.com wrote:
> 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.
...

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

newtop...@yahoo.com

unread,
Apr 10, 2006, 5:04:00 PM4/10/06
to
Jeff Hobbs wrote:
> 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.

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

Jeff Hobbs

unread,
Apr 11, 2006, 1:41:49 AM4/11/06
to newtop...@yahoo.com

If you use the "Scan" operation after loading in your script in TDK
TclApp, then it should recognize the dependencies.

Jeff

0 new messages