Sample code for 30+ languages & platforms
Swift

Transition from MailMan.GetFullEmail to MailMan.FetchFull

Provides instructions for replacing deprecated GetFullEmail method calls with FetchFull.

Chilkat Swift Downloads

Swift

func chilkatTest() {
    var success: Bool = false

    let mailman = CkoMailMan()!

    // ...
    // ...

    // Assume the email header was previously downloaded using some other Chilkat method...
    let emailHeader = CkoEmail()!

    // ------------------------------------------------------------------------
    // The GetFullEmail method is deprecated:

    var fullEmailObj: CkoEmail? = mailman.getFullEmail(email: emailHeader)
    if mailman.lastMethodSuccess == false {
        print("\(mailman.lastErrorText!)")
        return
    }

    // ...
    // ...

    fullEmailObj = nil

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

    let fullEmail = CkoEmail()!
    success = mailman.fetchFull(partialEmail: emailHeader, fullEmail: fullEmail)
    if success == false {
        print("\(mailman.lastErrorText!)")
        return
    }


}