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

Transition from MailMan.LoadMbx to MailMan.LoadMbxFile

Provides instructions for replacing deprecated LoadMbx method calls with LoadMbxFile.

Chilkat Go Downloads

Go
    success := false

    mailman := chilkat.NewMailMan()

    //  ...
    //  ...

    filePath := "c:/test/example.mbx"

    //  ------------------------------------------------------------------------
    //  The LoadMbx method is deprecated:

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

    //  ...
    //  ...

    bundleObj.DisposeEmailBundle()

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

    bundleOut := chilkat.NewEmailBundle()
    success = mailman.LoadMbxFile(filePath,bundleOut)
    if success == false {
        fmt.Println(mailman.LastErrorText())
        mailman.DisposeMailMan()
        bundleOut.DisposeEmailBundle()
        return
    }


    mailman.DisposeMailMan()
    bundleOut.DisposeEmailBundle()