Sample code for 30+ languages & platforms
PowerShell

Demonstrates how to call AddPfxSourceData for an Email Object

Demonstrates how to call AddPfxSourceData for an Email Object

Chilkat PowerShell Downloads

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

$success = $false

$fac = New-Object Chilkat.FileAccess

$pfxBytes = $fac.ReadEntireFile("qa_data/pfx/some.pfx")

$email = New-Object Chilkat.Email

$success = $email.AddPfxSourceData($pfxBytes,"PFX_PASSWORD")
if ($success -ne $true) {
    $($email.LastErrorText)
    exit
}

$("Success.")