Sample code for 30+ languages & platforms
Go Requires Chilkat v11.0.0+

Transition from MailMan.TransferMail to MailMan.FetchAll

Provides instructions for replacing deprecated TransferMail method calls with FetchAll.

Chilkat Go Downloads

Go
    success := false

    mailman := chilkat.NewMailMan()

    //  ...
    //  ...

    //  ------------------------------------------------------------------------
    //  The TransferMail method is deprecated:

    bundleObj := mailman.TransferMail()
    if mailman.LastMethodSuccess() == false {
        fmt.Println(mailman.LastErrorText())
        mailman.DisposeMailMan()
        return
    }

    //  ...
    //  ...

    bundleObj.DisposeEmailBundle()

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

    keepOnServer := false
    headersOnly := false
    //  Irrelevent because we are not downloading headers-only.
    numBodyLines := 0

    bundleOut := chilkat.NewEmailBundle()
    success = mailman.FetchAll(keepOnServer,headersOnly,numBodyLines,bundleOut)
    if success == false {
        fmt.Println(mailman.LastErrorText())
        mailman.DisposeMailMan()
        bundleOut.DisposeEmailBundle()
        return
    }


    mailman.DisposeMailMan()
    bundleOut.DisposeEmailBundle()