Sample code for 30+ languages & platforms
PHP ActiveX

Demonstrates how to call AddPfxSourceData for an Email Object

Demonstrates how to call AddPfxSourceData for an Email Object

Chilkat PHP ActiveX Downloads

PHP ActiveX
<?php

$success = 0;

$fac = new COM("Chilkat.FileAccess");

$pfxBytes = $fac->ReadEntireFile('qa_data/pfx/some.pfx');

$email = new COM("Chilkat.Email");

$success = $email->AddPfxSourceData($pfxBytes,'PFX_PASSWORD');
if ($success != 1) {
    print $email->LastErrorText . "\n";
    exit;
}

print 'Success.' . "\n";

?>