Delphi ActiveX
Delphi ActiveX
Demonstrates how to call AddPfxSourceData for an Email Object
Demonstrates how to call AddPfxSourceData for an Email ObjectChilkat Delphi ActiveX Downloads
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Chilkat_TLB;
...
procedure TForm1.Button1Click(Sender: TObject);
var
success: Integer;
fac: TCkFileAccess;
pfxBytes: Array of Byte;
email: TChilkatEmail;
begin
success := 0;
fac := TCkFileAccess.Create(Self);
pfxBytes := fac.ReadEntireFile('qa_data/pfx/some.pfx');
email := TChilkatEmail.Create(Self);
success := email.AddPfxSourceData(pfxBytes,'PFX_PASSWORD');
if (success <> 1) then
begin
Memo1.Lines.Add(email.LastErrorText);
Exit;
end;
Memo1.Lines.Add('Success.');
end;