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

Transition from MailMan.LoadXmlFile to EmailBundle.LoadXml

Provides instructions for replacing deprecated LoadXmlFile method calls with EmailBundle.LoadXml.

Chilkat PowerShell Downloads

PowerShell
Add-Type -Path "C:\chilkat\ChilkatDotNet47-x64\ChilkatDotNet47.dll"

$success = $false

$mailman = New-Object Chilkat.MailMan

#  ...
#  ...

$filePath = "c:/example/emailBundle.xml"

#  ------------------------------------------------------------------------
#  The LoadXmlFile method is deprecated:

$bundleObj = $mailman.LoadXmlFile($filePath)
if ($mailman.LastMethodSuccess -eq $false) {
    $($mailman.LastErrorText)
    exit
}

#  ...
#  ...

#  ------------------------------------------------------------------------
#  Do the equivalent using EmailBundle.LoadXml.

$bundle = New-Object Chilkat.EmailBundle
$success = $bundle.LoadXml($filePath)
if ($success -eq $false) {
    $($bundle.LastErrorText)
    exit
}