Tcl
Tcl
Transition from Email.CreateDsn to Email.ToDsn
Provides instructions for replacing deprecated CreateDsn method calls with ToDsn.Chilkat Tcl Downloads
load ./chilkat.dll
set success 0
set email [new_CkEmail]
# ...
# ...
set explanation "..."
set statusFieldsXml "..."
set headerOnly 0
# ------------------------------------------------------------------------
# The CreateDsn method is deprecated:
# emailObj is a CkEmail
set emailObj [CkEmail_CreateDsn $email $explanation $statusFieldsXml $headerOnly]
if {[CkEmail_get_LastMethodSuccess $email] == 0} then {
puts [CkEmail_lastErrorText $email]
delete_CkEmail $email
exit
}
# ...
# ...
delete_CkEmail $emailObj
# ------------------------------------------------------------------------
# Do the equivalent using ToDsn.
# Your application creates a new, empty Email object which is passed
# in the last argument and filled upon success.
set dsnEmail [new_CkEmail]
set success [CkEmail_ToDsn $email $explanation $statusFieldsXml $headerOnly $dsnEmail]
if {$success == 0} then {
puts [CkEmail_lastErrorText $email]
delete_CkEmail $email
delete_CkEmail $dsnEmail
exit
}
delete_CkEmail $email
delete_CkEmail $dsnEmail