Sample code for 30+ languages & platforms
C#

Demonstrates how to call AddPfxSourceData for an Email Object

Demonstrates how to call AddPfxSourceData for an Email Object

Chilkat C# Downloads

C#
bool success = false;

Chilkat.FileAccess fac = new Chilkat.FileAccess();
byte[] pfxBytes = null;
pfxBytes = fac.ReadEntireFile("qa_data/pfx/some.pfx");

Chilkat.Email email = new Chilkat.Email();

success = email.AddPfxSourceData(pfxBytes,"PFX_PASSWORD");
if (success != true) {
    Debug.WriteLine(email.LastErrorText);
    return;
}

Debug.WriteLine("Success.");