int Ns_TclEval ( Ns_DString *pds, char *hServer char *script );
The Ns_TclEval function executes the Tcl function specified by script
on the server specified by hServer
. It writes the results to the passed-in pds
variable.
Note that the string in script
may be temporarily modified by Tcl, so it must be writable. For example, use:
char script[*]="sometcl";
char *script="sometcl";
Use this code to call ns_sendmail from C:
NS_DStringVarAppend(&dsScript, "ns_sendmail", to, " ", from, " ", subject, " ", body); status=Ns_TclEval(&dsResult, Ns_ConnServer(conn), dsScript.string)