tcl - Wrapping program with TclApp causes smtp package to stop working properly? -


so i'm getting strange issue when trying send email company's local mail server using tcl. problem i've written code works, doesn't work wrap tclapp. believe i've included necessary packages.

code:

package require smtp; package require mime; package require tls;  set body "hello world, sending email! hear me roar.";  #mime info set token [mime::initialize -canonical text/plain -string $body];  #mail options set opts {};  #mail server + port lappend opts -servers "my_server"; lappend opts -ports 25;  tls::init -tls1 1; lappend opts -username "someemail@example.com"; lappend opts -password "somepasswordexample";  #subject + +  lappend opts -header [list "subject" "this test e-mail, beware!!"]; lappend opts -header [list "from" "thefromemail@example.com"]; lappend opts -header [list "to" "thetoemail@yahoo.com"];   if {[catch {     smtp::sendmessage $token \     {*}$opts \     -queue false \     -atleastone false \     -usetls false \     -debug 1;      mime::finalize $token;   } msg]} {     set out [open "error_log.txt" w];     puts $out $msg;     close $out; }  puts "hit enter continue..."; gets stdin; exit; 

this works when run , email sent. when wrap it, doesn't. here's output after wrapping , executing program: enter image description here

for whatever reason, wrapping tclapp makes program fail authenticate.

*update: i've decided try wrap script freewrap see if same problem , amazingly not. script works if not wrapped or if wrapped freewrap, not tclapp; bug in tclapp or missing obvious?

it seems old problem (last post): https://community.activestate.com/forum/wrapping-package-tls151

  1. investigate whether wrapped version has same .dll dependencies in article linked.
  2. check in tcl wiki see whether known issue ( tcl wiki ).
  3. are initializing environment when wrapped ( tcl app initialization )?

Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -