Sample code for 30+ languages & platforms
Tcl

Transition from Email.GetAttachedMessage to Email.GetAttachedEmail

Provides instructions for replacing deprecated GetAttachedMessage method calls with GetAttachedEmail.

Chilkat Tcl Downloads

Tcl

load ./chilkat.dll

set success 0

set email [new_CkEmail]

# ...
# ...
set index 0

# ------------------------------------------------------------------------
# The GetAttachedMessage method is deprecated:

# emailObj is a CkEmail
set emailObj [CkEmail_GetAttachedMessage $email $index]
if {[CkEmail_get_LastMethodSuccess $email] == 0} then {
    puts [CkEmail_lastErrorText $email]
    delete_CkEmail $email
    exit
}

# ...
# ...

delete_CkEmail $emailObj

# ------------------------------------------------------------------------
# Do the equivalent using GetAttachedEmail.
# Your application creates a new, empty Email object which is passed 
# in the last argument and filled upon success.

set emailOut [new_CkEmail]

set success [CkEmail_GetAttachedEmail $email $index $emailOut]
if {$success == 0} then {
    puts [CkEmail_lastErrorText $email]
    delete_CkEmail $email
    delete_CkEmail $emailOut
    exit
}


delete_CkEmail $email
delete_CkEmail $emailOut