(PowerShell) Transition from MailMan.LoadXmlString to EmailBundle.LoadXmlString
Provides instructions for replacing deprecated LoadXmlString method calls with EmailBundle.LoadXmlString. Note: This example requires Chilkat v11.0.0 or greater.
Add-Type -Path "C:\chilkat\ChilkatDotNet47-x64\ChilkatDotNet47.dll"
$mailman = New-Object Chilkat.MailMan
# ...
# ...
$xmlBundleStr = "..."
# ------------------------------------------------------------------------
# The LoadXmlString method is deprecated:
$bundleObj = $mailman.LoadXmlString($xmlBundleStr)
if ($mailman.LastMethodSuccess -eq $false) {
$($mailman.LastErrorText)
exit
}
# ...
# ...
# ------------------------------------------------------------------------
# Do the equivalent using EmailBundle.LoadXmlString.
$bundle = New-Object Chilkat.EmailBundle
$success = $bundle.LoadXmlString($xmlBundleStr)
if ($success -eq $false) {
$($bundle.LastErrorText)
exit
}
|