unit Chilkat.Email;

{
  Pascal wrapper for Chilkat Email.
  Auto-generated by PascalWrapperGenerator -- do not edit manually.
}

{$IFDEF FPC}
  {$MODE DELPHI}
{$ENDIF}

interface

uses
  SysUtils,
  Chilkat.Base;

type

  { TEmail wraps CkEmail via the C bridge layer. }
  TEmail = class(TChilkatBase)
  private
    function  GetLastErrorHtml: string;
    function  GetLastErrorText: string;
    function  GetLastErrorXml: string;
    function  GetVersion: string;
    function  GetDebugLogFilePath: string;
    procedure SetDebugLogFilePath(AValue: string);
    function  GetVerboseLogging: Boolean;
    procedure SetVerboseLogging(AValue: Boolean);
    function  GetLastMethodSuccess: Boolean;
    procedure SetLastMethodSuccess(AValue: Boolean);
    function  GetBody: string;
    procedure SetBody(AValue: string);
    function  GetCharset: string;
    procedure SetCharset(AValue: string);
    function  GetDecrypted: Boolean;
    function  GetEmailDateStr: string;
    procedure SetEmailDateStr(AValue: string);
    function  GetEncryptedBy: string;
    function  GetFileDistList: string;
    procedure SetFileDistList(AValue: string);
    function  GetFrom: string;
    procedure SetFrom(AValue: string);
    function  GetFromAddress: string;
    procedure SetFromAddress(AValue: string);
    function  GetFromName: string;
    procedure SetFromName(AValue: string);
    function  GetHeader: string;
    function  GetLanguage: string;
    function  GetLocalDateStr: string;
    procedure SetLocalDateStr(AValue: string);
    function  GetMailer: string;
    procedure SetMailer(AValue: string);
    function  GetNumAlternatives: Integer;
    function  GetNumAttachedMessages: Integer;
    function  GetNumAttachments: Integer;
    function  GetNumBcc: Integer;
    function  GetNumCC: Integer;
    function  GetNumDaysOld: Integer;
    function  GetNumHeaderFields: Integer;
    function  GetNumRelatedItems: Integer;
    function  GetNumReplacePatterns: Integer;
    function  GetNumReports: Integer;
    function  GetNumTo: Integer;
    function  GetOverwriteExisting: Boolean;
    procedure SetOverwriteExisting(AValue: Boolean);
    function  GetPkcs7CryptAlg: string;
    procedure SetPkcs7CryptAlg(AValue: string);
    function  GetPkcs7KeyLength: Integer;
    procedure SetPkcs7KeyLength(AValue: Integer);
    function  GetPreferredCharset: string;
    procedure SetPreferredCharset(AValue: string);
    function  GetPrependHeaders: Boolean;
    procedure SetPrependHeaders(AValue: Boolean);
    function  GetReceivedEncrypted: Boolean;
    function  GetReceivedSigned: Boolean;
    function  GetReplyTo: string;
    procedure SetReplyTo(AValue: string);
    function  GetReturnReceipt: Boolean;
    procedure SetReturnReceipt(AValue: Boolean);
    function  GetSendEncrypted: Boolean;
    procedure SetSendEncrypted(AValue: Boolean);
    function  GetSendSigned: Boolean;
    procedure SetSendSigned(AValue: Boolean);
    function  GetSignaturesValid: Boolean;
    function  GetSignedBy: string;
    function  GetSigningHashAlg: string;
    procedure SetSigningHashAlg(AValue: string);
    function  GetSize: Integer;
    function  GetSubject: string;
    procedure SetSubject(AValue: string);
    function  GetUidl: string;
    function  GetUnpackUseRelPaths: Boolean;
    procedure SetUnpackUseRelPaths(AValue: Boolean);
    function  GetNumDigests: Integer;
    function  GetSigningAlg: string;
    procedure SetSigningAlg(AValue: string);
    function  GetOaepPadding: Boolean;
    procedure SetOaepPadding(AValue: Boolean);
    function  GetOaepHash: string;
    procedure SetOaepHash(AValue: string);
    function  GetOaepMgfHash: string;
    procedure SetOaepMgfHash(AValue: string);
    function  GetUncommonOptions: string;
    procedure SetUncommonOptions(AValue: string);
  public
    constructor Create;
    destructor  Destroy; override;

    property LastErrorHtml: string read GetLastErrorHtml;
    property LastErrorText: string read GetLastErrorText;
    property LastErrorXml: string read GetLastErrorXml;
    property Version: string read GetVersion;
    property DebugLogFilePath: string read GetDebugLogFilePath write SetDebugLogFilePath;
    property VerboseLogging: Boolean read GetVerboseLogging write SetVerboseLogging;
    property LastMethodSuccess: Boolean read GetLastMethodSuccess write SetLastMethodSuccess;
    property Body: string read GetBody write SetBody;
    property Charset: string read GetCharset write SetCharset;
    property Decrypted: Boolean read GetDecrypted;
    property EmailDateStr: string read GetEmailDateStr write SetEmailDateStr;
    property EncryptedBy: string read GetEncryptedBy;
    property FileDistList: string read GetFileDistList write SetFileDistList;
    property From: string read GetFrom write SetFrom;
    property FromAddress: string read GetFromAddress write SetFromAddress;
    property FromName: string read GetFromName write SetFromName;
    property Header: string read GetHeader;
    property Language: string read GetLanguage;
    property LocalDateStr: string read GetLocalDateStr write SetLocalDateStr;
    property Mailer: string read GetMailer write SetMailer;
    property NumAlternatives: Integer read GetNumAlternatives;
    property NumAttachedMessages: Integer read GetNumAttachedMessages;
    property NumAttachments: Integer read GetNumAttachments;
    property NumBcc: Integer read GetNumBcc;
    property NumCC: Integer read GetNumCC;
    property NumDaysOld: Integer read GetNumDaysOld;
    property NumHeaderFields: Integer read GetNumHeaderFields;
    property NumRelatedItems: Integer read GetNumRelatedItems;
    property NumReplacePatterns: Integer read GetNumReplacePatterns;
    property NumReports: Integer read GetNumReports;
    property NumTo: Integer read GetNumTo;
    property OverwriteExisting: Boolean read GetOverwriteExisting write SetOverwriteExisting;
    property Pkcs7CryptAlg: string read GetPkcs7CryptAlg write SetPkcs7CryptAlg;
    property Pkcs7KeyLength: Integer read GetPkcs7KeyLength write SetPkcs7KeyLength;
    property PreferredCharset: string read GetPreferredCharset write SetPreferredCharset;
    property PrependHeaders: Boolean read GetPrependHeaders write SetPrependHeaders;
    property ReceivedEncrypted: Boolean read GetReceivedEncrypted;
    property ReceivedSigned: Boolean read GetReceivedSigned;
    property ReplyTo: string read GetReplyTo write SetReplyTo;
    property ReturnReceipt: Boolean read GetReturnReceipt write SetReturnReceipt;
    property SendEncrypted: Boolean read GetSendEncrypted write SetSendEncrypted;
    property SendSigned: Boolean read GetSendSigned write SetSendSigned;
    property SignaturesValid: Boolean read GetSignaturesValid;
    property SignedBy: string read GetSignedBy;
    property SigningHashAlg: string read GetSigningHashAlg write SetSigningHashAlg;
    property Size: Integer read GetSize;
    property Subject: string read GetSubject write SetSubject;
    property Uidl: string read GetUidl;
    property UnpackUseRelPaths: Boolean read GetUnpackUseRelPaths write SetUnpackUseRelPaths;
    property NumDigests: Integer read GetNumDigests;
    property SigningAlg: string read GetSigningAlg write SetSigningAlg;
    property OaepPadding: Boolean read GetOaepPadding write SetOaepPadding;
    property OaepHash: string read GetOaepHash write SetOaepHash;
    property OaepMgfHash: string read GetOaepMgfHash write SetOaepMgfHash;
    property UncommonOptions: string read GetUncommonOptions write SetUncommonOptions;

    procedure AddAttachmentHeader(index: Integer; const fieldName: string; const fieldValue: string);
    function  AddBcc(const friendlyName: string; const emailAddress: string): Boolean;
    function  AddCC(const friendlyName: string; const emailAddress: string): Boolean;
    function  AddEncryptCert(cert: TChilkatBase): Boolean;
    function  AddFileAttachment(const path: string): string;
    function  AddFileAttachment2(const path: string; const contentType: string): Boolean;
    procedure AddHeaderField(const fieldName: string; const fieldValue: string);
    procedure AddHeaderField2(const fieldName: string; const fieldValue: string);
    function  AddHtmlAlternativeBody(const body: string): Boolean;
    function  AddMultipleBcc(const commaSeparatedAddresses: string): Boolean;
    function  AddMultipleCC(const commaSeparatedAddresses: string): Boolean;
    function  AddMultipleTo(const commaSeparatedAddresses: string): Boolean;
    function  AddPfxSourceFile(const pfxFilePath: string; const pfxPassword: string): Boolean;
    function  AddPlainTextAlternativeBody(const body: string): Boolean;
    function  AddRelatedFile(const path: string): string;
    function  AddRelatedFile2(const filenameOnDisk: string; const filenameInHtml: string): Boolean;
    procedure AddRelatedHeader(index: Integer; const fieldName: string; const fieldValue: string);
    function  AddRelatedString(const nameInHtml: string; const str: string; const charset: string): string;
    procedure AddRelatedString2(const fileNameInHtml: string; const content: string; const charset: string);
    function  AddStringAttachment(const path: string; const content: string): Boolean;
    function  AddStringAttachment2(const path: string; const content: string; const charset: string): Boolean;
    function  AddTo(const friendlyName: string; const emailAddress: string): Boolean;
    function  AddiCalendarAlternativeBody(const icalContent: string; const methodName: string): Boolean;
    function  AesDecrypt(const password: string): Boolean;
    function  AesEncrypt(const password: string): Boolean;
    procedure AppendToBody(const str: string);
    function  AspUnpack(const prefix: string; const saveDir: string; const urlPath: string; cleanFiles: Boolean): Boolean;
    function  BEncodeString(const str: string; const charset: string): string;
    procedure ClearBcc;
    procedure ClearCC;
    procedure ClearEncryptCerts;
    procedure ClearTo;
    function  CreateTempMht(const inFilename: string): string;
    procedure DropAttachments;
    procedure DropRelatedItem(index: Integer);
    procedure DropRelatedItems;
    function  DropSingleAttachment(index: Integer): Boolean;
    function  GenerateFilename: string;
    function  GetAltHeaderField(index: Integer; const fieldName: string): string;
    function  GetAlternativeBody(index: Integer): string;
    function  GetAlternativeBodyByContentType(const contentType: string): string;
    function  GetAlternativeContentType(index: Integer): string;
    function  GetAttachedMessageAttr(index: Integer; const fieldName: string; const attrName: string): string;
    function  GetAttachedMessageFilename(index: Integer): string;
    function  GetAttachmentAttr(index: Integer; const fieldName: string; const attrName: string): string;
    function  GetAttachmentContentID(index: Integer): string;
    function  GetAttachmentContentType(index: Integer): string;
    function  GetAttachmentFilename(index: Integer): string;
    function  GetAttachmentHeader(attachIndex: Integer; const fieldName: string): string;
    function  GetAttachmentSize(index: Integer): Integer;
    function  GetAttachmentString(index: Integer; const charset: string): string;
    function  GetAttachmentStringCrLf(index: Integer; const charset: string): string;
    function  GetBcc(index: Integer): string;
    function  GetBccAddr(index: Integer): string;
    function  GetBccName(index: Integer): string;
    function  GetCC(index: Integer): string;
    function  GetCcAddr(index: Integer): string;
    function  GetCcName(index: Integer): string;
    function  GetDeliveryStatusInfo(const fieldName: string): string;
    function  GetHeaderField(const fieldName: string): string;
    function  GetHeaderFieldName(index: Integer): string;
    function  GetHeaderFieldValue(index: Integer): string;
    function  GetHtmlBody: string;
    function  GetImapUid: LongWord;
    function  GetMime: string;
    function  GetNthTextPartOfType(index: Integer; const contentType: string; inlineOnly: Boolean; excludeAttachments: Boolean): string;
    function  GetNumPartsOfType(const contentType: string; inlineOnly: Boolean; excludeAttachments: Boolean): Integer;
    function  GetPlainTextBody: string;
    function  GetRelatedAttr(index: Integer; const fieldName: string; const attrName: string): string;
    function  GetRelatedContentID(index: Integer): string;
    function  GetRelatedContentLocation(index: Integer): string;
    function  GetRelatedContentType(index: Integer): string;
    function  GetRelatedFilename(index: Integer): string;
    function  GetRelatedString(index: Integer; const charset: string): string;
    function  GetRelatedStringCrLf(index: Integer; const charset: string): string;
    function  GetReplacePattern(index: Integer): string;
    function  GetReplaceString(index: Integer): string;
    function  GetReplaceString2(const pattern: string): string;
    function  GetReport(index: Integer): string;
    function  GetTo(index: Integer): string;
    function  GetToAddr(index: Integer): string;
    function  GetToName(index: Integer): string;
    function  GetXml: string;
    function  HasHeaderMatching(const fieldName: string; const valuePattern: string; caseSensitive: Boolean): Boolean;
    function  HasHtmlBody: Boolean;
    function  HasPlainTextBody: Boolean;
    function  IsMultipartReport: Boolean;
    function  LoadEml(const mimePath: string): Boolean;
    function  LoadXml(const xmlPath: string): Boolean;
    function  LoadXmlString(const xmlStr: string): Boolean;
    function  QEncodeString(const str: string; const charset: string): string;
    procedure RemoveAttachedMessage(idx: Integer);
    procedure RemoveAttachedMessages;
    procedure RemoveAttachmentPaths;
    procedure RemoveHeaderField(const fieldName: string);
    procedure RemoveHtmlAlternative;
    procedure RemovePlainTextAlternative;
    function  SaveAllAttachments(const dirPath: string): Boolean;
    function  SaveAttachedFile(index: Integer; const dirPath: string): Boolean;
    function  SaveEml(const emlFilePath: string): Boolean;
    function  SaveRelatedItem(index: Integer; const dirPath: string): Boolean;
    function  SaveXml(const path: string): Boolean;
    function  SetAttachmentCharset(index: Integer; const charset: string): Boolean;
    function  SetAttachmentDisposition(index: Integer; const disposition: string): Boolean;
    function  SetAttachmentFilename(index: Integer; const filename: string): Boolean;
    function  SetDecryptCert(cert: TChilkatBase): Boolean;
    function  SetDecryptCert2(cert: TChilkatBase; key: TChilkatBase): Boolean;
    function  SetDt(dt: TChilkatBase): Boolean;
    procedure SetEdifactBody(const message: string; const name: string; const filename: string; const charset: string);
    function  SetEncryptCert(cert: TChilkatBase): Boolean;
    function  SetFromMimeText(const mimeText: string): Boolean;
    function  SetFromXmlText(const xmlStr: string): Boolean;
    procedure SetHtmlBody(const html: string);
    function  SetRelatedFilename(index: Integer; const path: string): Boolean;
    function  SetReplacePattern(const pattern: string; const replaceString: string): Boolean;
    function  SetSigningCert(cert: TChilkatBase): Boolean;
    function  SetSigningCert2(cert: TChilkatBase; key: TChilkatBase): Boolean;
    procedure SetTextBody(const bodyText: string; const contentType: string);
    function  UidlEquals(e: TChilkatBase): Boolean;
    procedure UnSpamify;
    function  UnpackHtml(const unpackDir: string; const htmlFilename: string; const partsSubdir: string): Boolean;
    function  UnzipAttachments: Boolean;
    function  UseCertVault(vault: TChilkatBase): Boolean;
    function  ZipAttachments(const zipFilename: string): Boolean;
    function  ComputeGlobalKey2(const encoding: string; bFold: Boolean): string;
    function  GetMimeSb(sb: TChilkatBase): Boolean;
    function  GetMimeBd(bindat: TChilkatBase): Boolean;
    function  SetFromMimeSb(sb: TChilkatBase): Boolean;
    function  SetFromMimeBd(bindat: TChilkatBase): Boolean;
    function  AddAttachmentBd(const filename: string; binData: TChilkatBase; const contentType: string): Boolean;
    function  AddRelatedBd(const filename: string; binData: TChilkatBase): string;
    function  AddRelatedBd2(binData: TChilkatBase; const fileNameInHtml: string): Boolean;
    function  GetAttachmentBd(index: Integer; binData: TChilkatBase): Boolean;
    function  GetAlternativeBodyBd(index: Integer; binData: TChilkatBase): Boolean;
    function  ApplyFixups(const fixups: string): Boolean;
    procedure Clear;
    function  ConvertInlineImages: Boolean;
    function  AttachEmail(email: TChilkatBase): Boolean;
    function  GetNthContentType(index: Integer; const contentType: string; inlineOnly: Boolean; excludeAttachments: Boolean): string;
    function  GetNthBinaryPartOfTypeBd(index: Integer; const contentType: string; inlineOnly: Boolean; excludeAttachments: Boolean; bd: TChilkatBase): Boolean;
    function  GetRelatedHeader(index: Integer; const fieldName: string): string;
    function  GetHtmlBodySb(inlineImageData: Boolean; sb: TChilkatBase): Boolean;
    function  LastDecryptCert(cert: TChilkatBase): Boolean;
    function  LastSignerCert(index: Integer; cert: TChilkatBase): Boolean;
    function  MakeCopy(destEmail: TChilkatBase): Boolean;
    function  ToDsn(const explanation: string; const statusFields: string; headerOnly: Boolean; dsnEmail: TChilkatBase): Boolean;
    function  ToForward(forward: TChilkatBase): Boolean;
    function  ToMdn(const message: string; const statusFields: string; headerOnly: Boolean; mdn: TChilkatBase): Boolean;
    function  ToReply(reply: TChilkatBase): Boolean;
    function  GetAttachedEmail(index: Integer; email: TChilkatBase): Boolean;
    function  GetDigestEmail(index: Integer; email: TChilkatBase): Boolean;
    function  GetDsnInfo(json: TChilkatBase): Boolean;
    function  LinkedDomains(domains: TChilkatBase): Boolean;
    function  AddPfxSourceBd(bd: TChilkatBase; const password: string): Boolean;
    function  SetBodyBd(bd: TChilkatBase; const contentType: string; const disposition: string; const filename: string): Boolean;
  end;

implementation

uses
  CkDllLoader,
  Chilkat.Utils;

{ ---- C bridge function pointer types ---- }
type
  TCkEmail_Create  = function(): Pointer; cdecl;
  TCkEmail_Dispose = procedure(handle: Pointer); cdecl;
  TCkEmail_get_LastErrorHtml = function(handle: Pointer): PAnsiChar; cdecl;
  TCkEmail_get_LastErrorText = function(handle: Pointer): PAnsiChar; cdecl;
  TCkEmail_get_LastErrorXml = function(handle: Pointer): PAnsiChar; cdecl;
  TCkEmail_get_Version = function(handle: Pointer): PAnsiChar; cdecl;
  TCkEmail_get_DebugLogFilePath = function(handle: Pointer): PAnsiChar; cdecl;
  TCkEmail_put_DebugLogFilePath = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkEmail_get_VerboseLogging = function(handle: Pointer): LongBool; cdecl;
  TCkEmail_put_VerboseLogging = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkEmail_get_LastMethodSuccess = function(handle: Pointer): LongBool; cdecl;
  TCkEmail_put_LastMethodSuccess = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkEmail_get_Body = function(handle: Pointer): PAnsiChar; cdecl;
  TCkEmail_put_Body = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkEmail_get_Charset = function(handle: Pointer): PAnsiChar; cdecl;
  TCkEmail_put_Charset = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkEmail_get_Decrypted = function(handle: Pointer): LongBool; cdecl;
  TCkEmail_get_EmailDateStr = function(handle: Pointer): PAnsiChar; cdecl;
  TCkEmail_put_EmailDateStr = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkEmail_get_EncryptedBy = function(handle: Pointer): PAnsiChar; cdecl;
  TCkEmail_get_FileDistList = function(handle: Pointer): PAnsiChar; cdecl;
  TCkEmail_put_FileDistList = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkEmail_get_From = function(handle: Pointer): PAnsiChar; cdecl;
  TCkEmail_put_From = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkEmail_get_FromAddress = function(handle: Pointer): PAnsiChar; cdecl;
  TCkEmail_put_FromAddress = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkEmail_get_FromName = function(handle: Pointer): PAnsiChar; cdecl;
  TCkEmail_put_FromName = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkEmail_get_Header = function(handle: Pointer): PAnsiChar; cdecl;
  TCkEmail_get_Language = function(handle: Pointer): PAnsiChar; cdecl;
  TCkEmail_get_LocalDateStr = function(handle: Pointer): PAnsiChar; cdecl;
  TCkEmail_put_LocalDateStr = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkEmail_get_Mailer = function(handle: Pointer): PAnsiChar; cdecl;
  TCkEmail_put_Mailer = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkEmail_get_NumAlternatives = function(handle: Pointer): Integer; cdecl;
  TCkEmail_get_NumAttachedMessages = function(handle: Pointer): Integer; cdecl;
  TCkEmail_get_NumAttachments = function(handle: Pointer): Integer; cdecl;
  TCkEmail_get_NumBcc = function(handle: Pointer): Integer; cdecl;
  TCkEmail_get_NumCC = function(handle: Pointer): Integer; cdecl;
  TCkEmail_get_NumDaysOld = function(handle: Pointer): Integer; cdecl;
  TCkEmail_get_NumHeaderFields = function(handle: Pointer): Integer; cdecl;
  TCkEmail_get_NumRelatedItems = function(handle: Pointer): Integer; cdecl;
  TCkEmail_get_NumReplacePatterns = function(handle: Pointer): Integer; cdecl;
  TCkEmail_get_NumReports = function(handle: Pointer): Integer; cdecl;
  TCkEmail_get_NumTo = function(handle: Pointer): Integer; cdecl;
  TCkEmail_get_OverwriteExisting = function(handle: Pointer): LongBool; cdecl;
  TCkEmail_put_OverwriteExisting = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkEmail_get_Pkcs7CryptAlg = function(handle: Pointer): PAnsiChar; cdecl;
  TCkEmail_put_Pkcs7CryptAlg = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkEmail_get_Pkcs7KeyLength = function(handle: Pointer): Integer; cdecl;
  TCkEmail_put_Pkcs7KeyLength = procedure(handle: Pointer; value: Integer); cdecl;
  TCkEmail_get_PreferredCharset = function(handle: Pointer): PAnsiChar; cdecl;
  TCkEmail_put_PreferredCharset = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkEmail_get_PrependHeaders = function(handle: Pointer): LongBool; cdecl;
  TCkEmail_put_PrependHeaders = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkEmail_get_ReceivedEncrypted = function(handle: Pointer): LongBool; cdecl;
  TCkEmail_get_ReceivedSigned = function(handle: Pointer): LongBool; cdecl;
  TCkEmail_get_ReplyTo = function(handle: Pointer): PAnsiChar; cdecl;
  TCkEmail_put_ReplyTo = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkEmail_get_ReturnReceipt = function(handle: Pointer): LongBool; cdecl;
  TCkEmail_put_ReturnReceipt = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkEmail_get_SendEncrypted = function(handle: Pointer): LongBool; cdecl;
  TCkEmail_put_SendEncrypted = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkEmail_get_SendSigned = function(handle: Pointer): LongBool; cdecl;
  TCkEmail_put_SendSigned = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkEmail_get_SignaturesValid = function(handle: Pointer): LongBool; cdecl;
  TCkEmail_get_SignedBy = function(handle: Pointer): PAnsiChar; cdecl;
  TCkEmail_get_SigningHashAlg = function(handle: Pointer): PAnsiChar; cdecl;
  TCkEmail_put_SigningHashAlg = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkEmail_get_Size = function(handle: Pointer): Integer; cdecl;
  TCkEmail_get_Subject = function(handle: Pointer): PAnsiChar; cdecl;
  TCkEmail_put_Subject = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkEmail_get_Uidl = function(handle: Pointer): PAnsiChar; cdecl;
  TCkEmail_get_UnpackUseRelPaths = function(handle: Pointer): LongBool; cdecl;
  TCkEmail_put_UnpackUseRelPaths = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkEmail_get_NumDigests = function(handle: Pointer): Integer; cdecl;
  TCkEmail_get_SigningAlg = function(handle: Pointer): PAnsiChar; cdecl;
  TCkEmail_put_SigningAlg = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkEmail_get_OaepPadding = function(handle: Pointer): LongBool; cdecl;
  TCkEmail_put_OaepPadding = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkEmail_get_OaepHash = function(handle: Pointer): PAnsiChar; cdecl;
  TCkEmail_put_OaepHash = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkEmail_get_OaepMgfHash = function(handle: Pointer): PAnsiChar; cdecl;
  TCkEmail_put_OaepMgfHash = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkEmail_get_UncommonOptions = function(handle: Pointer): PAnsiChar; cdecl;
  TCkEmail_put_UncommonOptions = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkEmail_AddAttachmentHeader = procedure(handle: Pointer; index: Integer; fieldName: PAnsiChar; fieldValue: PAnsiChar); cdecl;
  TCkEmail_AddBcc = function(handle: Pointer; friendlyName: PAnsiChar; emailAddress: PAnsiChar): LongBool; cdecl;
  TCkEmail_AddCC = function(handle: Pointer; friendlyName: PAnsiChar; emailAddress: PAnsiChar): LongBool; cdecl;
  TCkEmail_AddEncryptCert = function(handle: Pointer; cert: Pointer): LongBool; cdecl;
  TCkEmail_AddFileAttachment = function(handle: Pointer; path: PAnsiChar): PAnsiChar; cdecl;
  TCkEmail_AddFileAttachment2 = function(handle: Pointer; path: PAnsiChar; contentType: PAnsiChar): LongBool; cdecl;
  TCkEmail_AddHeaderField = procedure(handle: Pointer; fieldName: PAnsiChar; fieldValue: PAnsiChar); cdecl;
  TCkEmail_AddHeaderField2 = procedure(handle: Pointer; fieldName: PAnsiChar; fieldValue: PAnsiChar); cdecl;
  TCkEmail_AddHtmlAlternativeBody = function(handle: Pointer; body: PAnsiChar): LongBool; cdecl;
  TCkEmail_AddMultipleBcc = function(handle: Pointer; commaSeparatedAddresses: PAnsiChar): LongBool; cdecl;
  TCkEmail_AddMultipleCC = function(handle: Pointer; commaSeparatedAddresses: PAnsiChar): LongBool; cdecl;
  TCkEmail_AddMultipleTo = function(handle: Pointer; commaSeparatedAddresses: PAnsiChar): LongBool; cdecl;
  TCkEmail_AddPfxSourceFile = function(handle: Pointer; pfxFilePath: PAnsiChar; pfxPassword: PAnsiChar): LongBool; cdecl;
  TCkEmail_AddPlainTextAlternativeBody = function(handle: Pointer; body: PAnsiChar): LongBool; cdecl;
  TCkEmail_AddRelatedFile = function(handle: Pointer; path: PAnsiChar): PAnsiChar; cdecl;
  TCkEmail_AddRelatedFile2 = function(handle: Pointer; filenameOnDisk: PAnsiChar; filenameInHtml: PAnsiChar): LongBool; cdecl;
  TCkEmail_AddRelatedHeader = procedure(handle: Pointer; index: Integer; fieldName: PAnsiChar; fieldValue: PAnsiChar); cdecl;
  TCkEmail_AddRelatedString = function(handle: Pointer; nameInHtml: PAnsiChar; str: PAnsiChar; charset: PAnsiChar): PAnsiChar; cdecl;
  TCkEmail_AddRelatedString2 = procedure(handle: Pointer; fileNameInHtml: PAnsiChar; content: PAnsiChar; charset: PAnsiChar); cdecl;
  TCkEmail_AddStringAttachment = function(handle: Pointer; path: PAnsiChar; content: PAnsiChar): LongBool; cdecl;
  TCkEmail_AddStringAttachment2 = function(handle: Pointer; path: PAnsiChar; content: PAnsiChar; charset: PAnsiChar): LongBool; cdecl;
  TCkEmail_AddTo = function(handle: Pointer; friendlyName: PAnsiChar; emailAddress: PAnsiChar): LongBool; cdecl;
  TCkEmail_AddiCalendarAlternativeBody = function(handle: Pointer; icalContent: PAnsiChar; methodName: PAnsiChar): LongBool; cdecl;
  TCkEmail_AesDecrypt = function(handle: Pointer; password: PAnsiChar): LongBool; cdecl;
  TCkEmail_AesEncrypt = function(handle: Pointer; password: PAnsiChar): LongBool; cdecl;
  TCkEmail_AppendToBody = procedure(handle: Pointer; str: PAnsiChar); cdecl;
  TCkEmail_AspUnpack = function(handle: Pointer; prefix: PAnsiChar; saveDir: PAnsiChar; urlPath: PAnsiChar; cleanFiles: LongBool): LongBool; cdecl;
  TCkEmail_BEncodeString = function(handle: Pointer; str: PAnsiChar; charset: PAnsiChar): PAnsiChar; cdecl;
  TCkEmail_ClearBcc = procedure(handle: Pointer); cdecl;
  TCkEmail_ClearCC = procedure(handle: Pointer); cdecl;
  TCkEmail_ClearEncryptCerts = procedure(handle: Pointer); cdecl;
  TCkEmail_ClearTo = procedure(handle: Pointer); cdecl;
  TCkEmail_CreateTempMht = function(handle: Pointer; inFilename: PAnsiChar): PAnsiChar; cdecl;
  TCkEmail_DropAttachments = procedure(handle: Pointer); cdecl;
  TCkEmail_DropRelatedItem = procedure(handle: Pointer; index: Integer); cdecl;
  TCkEmail_DropRelatedItems = procedure(handle: Pointer); cdecl;
  TCkEmail_DropSingleAttachment = function(handle: Pointer; index: Integer): LongBool; cdecl;
  TCkEmail_GenerateFilename = function(handle: Pointer): PAnsiChar; cdecl;
  TCkEmail_GetAltHeaderField = function(handle: Pointer; index: Integer; fieldName: PAnsiChar): PAnsiChar; cdecl;
  TCkEmail_GetAlternativeBody = function(handle: Pointer; index: Integer): PAnsiChar; cdecl;
  TCkEmail_GetAlternativeBodyByContentType = function(handle: Pointer; contentType: PAnsiChar): PAnsiChar; cdecl;
  TCkEmail_GetAlternativeContentType = function(handle: Pointer; index: Integer): PAnsiChar; cdecl;
  TCkEmail_GetAttachedMessageAttr = function(handle: Pointer; index: Integer; fieldName: PAnsiChar; attrName: PAnsiChar): PAnsiChar; cdecl;
  TCkEmail_GetAttachedMessageFilename = function(handle: Pointer; index: Integer): PAnsiChar; cdecl;
  TCkEmail_GetAttachmentAttr = function(handle: Pointer; index: Integer; fieldName: PAnsiChar; attrName: PAnsiChar): PAnsiChar; cdecl;
  TCkEmail_GetAttachmentContentID = function(handle: Pointer; index: Integer): PAnsiChar; cdecl;
  TCkEmail_GetAttachmentContentType = function(handle: Pointer; index: Integer): PAnsiChar; cdecl;
  TCkEmail_GetAttachmentFilename = function(handle: Pointer; index: Integer): PAnsiChar; cdecl;
  TCkEmail_GetAttachmentHeader = function(handle: Pointer; attachIndex: Integer; fieldName: PAnsiChar): PAnsiChar; cdecl;
  TCkEmail_GetAttachmentSize = function(handle: Pointer; index: Integer): Integer; cdecl;
  TCkEmail_GetAttachmentString = function(handle: Pointer; index: Integer; charset: PAnsiChar): PAnsiChar; cdecl;
  TCkEmail_GetAttachmentStringCrLf = function(handle: Pointer; index: Integer; charset: PAnsiChar): PAnsiChar; cdecl;
  TCkEmail_GetBcc = function(handle: Pointer; index: Integer): PAnsiChar; cdecl;
  TCkEmail_GetBccAddr = function(handle: Pointer; index: Integer): PAnsiChar; cdecl;
  TCkEmail_GetBccName = function(handle: Pointer; index: Integer): PAnsiChar; cdecl;
  TCkEmail_GetCC = function(handle: Pointer; index: Integer): PAnsiChar; cdecl;
  TCkEmail_GetCcAddr = function(handle: Pointer; index: Integer): PAnsiChar; cdecl;
  TCkEmail_GetCcName = function(handle: Pointer; index: Integer): PAnsiChar; cdecl;
  TCkEmail_GetDeliveryStatusInfo = function(handle: Pointer; fieldName: PAnsiChar): PAnsiChar; cdecl;
  TCkEmail_GetHeaderField = function(handle: Pointer; fieldName: PAnsiChar): PAnsiChar; cdecl;
  TCkEmail_GetHeaderFieldName = function(handle: Pointer; index: Integer): PAnsiChar; cdecl;
  TCkEmail_GetHeaderFieldValue = function(handle: Pointer; index: Integer): PAnsiChar; cdecl;
  TCkEmail_GetHtmlBody = function(handle: Pointer): PAnsiChar; cdecl;
  TCkEmail_GetImapUid = function(handle: Pointer): LongWord; cdecl;
  TCkEmail_GetMime = function(handle: Pointer): PAnsiChar; cdecl;
  TCkEmail_GetNthTextPartOfType = function(handle: Pointer; index: Integer; contentType: PAnsiChar; inlineOnly: LongBool; excludeAttachments: LongBool): PAnsiChar; cdecl;
  TCkEmail_GetNumPartsOfType = function(handle: Pointer; contentType: PAnsiChar; inlineOnly: LongBool; excludeAttachments: LongBool): Integer; cdecl;
  TCkEmail_GetPlainTextBody = function(handle: Pointer): PAnsiChar; cdecl;
  TCkEmail_GetRelatedAttr = function(handle: Pointer; index: Integer; fieldName: PAnsiChar; attrName: PAnsiChar): PAnsiChar; cdecl;
  TCkEmail_GetRelatedContentID = function(handle: Pointer; index: Integer): PAnsiChar; cdecl;
  TCkEmail_GetRelatedContentLocation = function(handle: Pointer; index: Integer): PAnsiChar; cdecl;
  TCkEmail_GetRelatedContentType = function(handle: Pointer; index: Integer): PAnsiChar; cdecl;
  TCkEmail_GetRelatedFilename = function(handle: Pointer; index: Integer): PAnsiChar; cdecl;
  TCkEmail_GetRelatedString = function(handle: Pointer; index: Integer; charset: PAnsiChar): PAnsiChar; cdecl;
  TCkEmail_GetRelatedStringCrLf = function(handle: Pointer; index: Integer; charset: PAnsiChar): PAnsiChar; cdecl;
  TCkEmail_GetReplacePattern = function(handle: Pointer; index: Integer): PAnsiChar; cdecl;
  TCkEmail_GetReplaceString = function(handle: Pointer; index: Integer): PAnsiChar; cdecl;
  TCkEmail_GetReplaceString2 = function(handle: Pointer; pattern: PAnsiChar): PAnsiChar; cdecl;
  TCkEmail_GetReport = function(handle: Pointer; index: Integer): PAnsiChar; cdecl;
  TCkEmail_GetTo = function(handle: Pointer; index: Integer): PAnsiChar; cdecl;
  TCkEmail_GetToAddr = function(handle: Pointer; index: Integer): PAnsiChar; cdecl;
  TCkEmail_GetToName = function(handle: Pointer; index: Integer): PAnsiChar; cdecl;
  TCkEmail_GetXml = function(handle: Pointer): PAnsiChar; cdecl;
  TCkEmail_HasHeaderMatching = function(handle: Pointer; fieldName: PAnsiChar; valuePattern: PAnsiChar; caseSensitive: LongBool): LongBool; cdecl;
  TCkEmail_HasHtmlBody = function(handle: Pointer): LongBool; cdecl;
  TCkEmail_HasPlainTextBody = function(handle: Pointer): LongBool; cdecl;
  TCkEmail_IsMultipartReport = function(handle: Pointer): LongBool; cdecl;
  TCkEmail_LoadEml = function(handle: Pointer; mimePath: PAnsiChar): LongBool; cdecl;
  TCkEmail_LoadXml = function(handle: Pointer; xmlPath: PAnsiChar): LongBool; cdecl;
  TCkEmail_LoadXmlString = function(handle: Pointer; xmlStr: PAnsiChar): LongBool; cdecl;
  TCkEmail_QEncodeString = function(handle: Pointer; str: PAnsiChar; charset: PAnsiChar): PAnsiChar; cdecl;
  TCkEmail_RemoveAttachedMessage = procedure(handle: Pointer; idx: Integer); cdecl;
  TCkEmail_RemoveAttachedMessages = procedure(handle: Pointer); cdecl;
  TCkEmail_RemoveAttachmentPaths = procedure(handle: Pointer); cdecl;
  TCkEmail_RemoveHeaderField = procedure(handle: Pointer; fieldName: PAnsiChar); cdecl;
  TCkEmail_RemoveHtmlAlternative = procedure(handle: Pointer); cdecl;
  TCkEmail_RemovePlainTextAlternative = procedure(handle: Pointer); cdecl;
  TCkEmail_SaveAllAttachments = function(handle: Pointer; dirPath: PAnsiChar): LongBool; cdecl;
  TCkEmail_SaveAttachedFile = function(handle: Pointer; index: Integer; dirPath: PAnsiChar): LongBool; cdecl;
  TCkEmail_SaveEml = function(handle: Pointer; emlFilePath: PAnsiChar): LongBool; cdecl;
  TCkEmail_SaveRelatedItem = function(handle: Pointer; index: Integer; dirPath: PAnsiChar): LongBool; cdecl;
  TCkEmail_SaveXml = function(handle: Pointer; path: PAnsiChar): LongBool; cdecl;
  TCkEmail_SetAttachmentCharset = function(handle: Pointer; index: Integer; charset: PAnsiChar): LongBool; cdecl;
  TCkEmail_SetAttachmentDisposition = function(handle: Pointer; index: Integer; disposition: PAnsiChar): LongBool; cdecl;
  TCkEmail_SetAttachmentFilename = function(handle: Pointer; index: Integer; filename: PAnsiChar): LongBool; cdecl;
  TCkEmail_SetDecryptCert = function(handle: Pointer; cert: Pointer): LongBool; cdecl;
  TCkEmail_SetDecryptCert2 = function(handle: Pointer; cert: Pointer; key: Pointer): LongBool; cdecl;
  TCkEmail_SetDt = function(handle: Pointer; dt: Pointer): LongBool; cdecl;
  TCkEmail_SetEdifactBody = procedure(handle: Pointer; message: PAnsiChar; name: PAnsiChar; filename: PAnsiChar; charset: PAnsiChar); cdecl;
  TCkEmail_SetEncryptCert = function(handle: Pointer; cert: Pointer): LongBool; cdecl;
  TCkEmail_SetFromMimeText = function(handle: Pointer; mimeText: PAnsiChar): LongBool; cdecl;
  TCkEmail_SetFromXmlText = function(handle: Pointer; xmlStr: PAnsiChar): LongBool; cdecl;
  TCkEmail_SetHtmlBody = procedure(handle: Pointer; html: PAnsiChar); cdecl;
  TCkEmail_SetRelatedFilename = function(handle: Pointer; index: Integer; path: PAnsiChar): LongBool; cdecl;
  TCkEmail_SetReplacePattern = function(handle: Pointer; pattern: PAnsiChar; replaceString: PAnsiChar): LongBool; cdecl;
  TCkEmail_SetSigningCert = function(handle: Pointer; cert: Pointer): LongBool; cdecl;
  TCkEmail_SetSigningCert2 = function(handle: Pointer; cert: Pointer; key: Pointer): LongBool; cdecl;
  TCkEmail_SetTextBody = procedure(handle: Pointer; bodyText: PAnsiChar; contentType: PAnsiChar); cdecl;
  TCkEmail_UidlEquals = function(handle: Pointer; e: Pointer): LongBool; cdecl;
  TCkEmail_UnSpamify = procedure(handle: Pointer); cdecl;
  TCkEmail_UnpackHtml = function(handle: Pointer; unpackDir: PAnsiChar; htmlFilename: PAnsiChar; partsSubdir: PAnsiChar): LongBool; cdecl;
  TCkEmail_UnzipAttachments = function(handle: Pointer): LongBool; cdecl;
  TCkEmail_UseCertVault = function(handle: Pointer; vault: Pointer): LongBool; cdecl;
  TCkEmail_ZipAttachments = function(handle: Pointer; zipFilename: PAnsiChar): LongBool; cdecl;
  TCkEmail_ComputeGlobalKey2 = function(handle: Pointer; encoding: PAnsiChar; bFold: LongBool): PAnsiChar; cdecl;
  TCkEmail_GetMimeSb = function(handle: Pointer; sb: Pointer): LongBool; cdecl;
  TCkEmail_GetMimeBd = function(handle: Pointer; bindat: Pointer): LongBool; cdecl;
  TCkEmail_SetFromMimeSb = function(handle: Pointer; sb: Pointer): LongBool; cdecl;
  TCkEmail_SetFromMimeBd = function(handle: Pointer; bindat: Pointer): LongBool; cdecl;
  TCkEmail_AddAttachmentBd = function(handle: Pointer; filename: PAnsiChar; binData: Pointer; contentType: PAnsiChar): LongBool; cdecl;
  TCkEmail_AddRelatedBd = function(handle: Pointer; filename: PAnsiChar; binData: Pointer): PAnsiChar; cdecl;
  TCkEmail_AddRelatedBd2 = function(handle: Pointer; binData: Pointer; fileNameInHtml: PAnsiChar): LongBool; cdecl;
  TCkEmail_GetAttachmentBd = function(handle: Pointer; index: Integer; binData: Pointer): LongBool; cdecl;
  TCkEmail_GetAlternativeBodyBd = function(handle: Pointer; index: Integer; binData: Pointer): LongBool; cdecl;
  TCkEmail_ApplyFixups = function(handle: Pointer; fixups: PAnsiChar): LongBool; cdecl;
  TCkEmail_Clear = procedure(handle: Pointer); cdecl;
  TCkEmail_ConvertInlineImages = function(handle: Pointer): LongBool; cdecl;
  TCkEmail_AttachEmail = function(handle: Pointer; email: Pointer): LongBool; cdecl;
  TCkEmail_GetNthContentType = function(handle: Pointer; index: Integer; contentType: PAnsiChar; inlineOnly: LongBool; excludeAttachments: LongBool): PAnsiChar; cdecl;
  TCkEmail_GetNthBinaryPartOfTypeBd = function(handle: Pointer; index: Integer; contentType: PAnsiChar; inlineOnly: LongBool; excludeAttachments: LongBool; bd: Pointer): LongBool; cdecl;
  TCkEmail_GetRelatedHeader = function(handle: Pointer; index: Integer; fieldName: PAnsiChar): PAnsiChar; cdecl;
  TCkEmail_GetHtmlBodySb = function(handle: Pointer; inlineImageData: LongBool; sb: Pointer): LongBool; cdecl;
  TCkEmail_LastDecryptCert = function(handle: Pointer; cert: Pointer): LongBool; cdecl;
  TCkEmail_LastSignerCert = function(handle: Pointer; index: Integer; cert: Pointer): LongBool; cdecl;
  TCkEmail_MakeCopy = function(handle: Pointer; destEmail: Pointer): LongBool; cdecl;
  TCkEmail_ToDsn = function(handle: Pointer; explanation: PAnsiChar; statusFields: PAnsiChar; headerOnly: LongBool; dsnEmail: Pointer): LongBool; cdecl;
  TCkEmail_ToForward = function(handle: Pointer; forward: Pointer): LongBool; cdecl;
  TCkEmail_ToMdn = function(handle: Pointer; message: PAnsiChar; statusFields: PAnsiChar; headerOnly: LongBool; mdn: Pointer): LongBool; cdecl;
  TCkEmail_ToReply = function(handle: Pointer; reply: Pointer): LongBool; cdecl;
  TCkEmail_GetAttachedEmail = function(handle: Pointer; index: Integer; email: Pointer): LongBool; cdecl;
  TCkEmail_GetDigestEmail = function(handle: Pointer; index: Integer; email: Pointer): LongBool; cdecl;
  TCkEmail_GetDsnInfo = function(handle: Pointer; json: Pointer): LongBool; cdecl;
  TCkEmail_LinkedDomains = function(handle: Pointer; domains: Pointer): LongBool; cdecl;
  TCkEmail_AddPfxSourceBd = function(handle: Pointer; bd: Pointer; password: PAnsiChar): LongBool; cdecl;
  TCkEmail_SetBodyBd = function(handle: Pointer; bd: Pointer; contentType: PAnsiChar; disposition: PAnsiChar; filename: PAnsiChar): LongBool; cdecl;

{ ---- C bridge function pointer variables ---- }
var
  CkEmail_Create:  TCkEmail_Create  = nil;
  CkEmail_Dispose: TCkEmail_Dispose = nil;
  CkEmail_get_LastErrorHtml: TCkEmail_get_LastErrorHtml = nil;
  CkEmail_get_LastErrorText: TCkEmail_get_LastErrorText = nil;
  CkEmail_get_LastErrorXml: TCkEmail_get_LastErrorXml = nil;
  CkEmail_get_Version: TCkEmail_get_Version = nil;
  CkEmail_get_DebugLogFilePath: TCkEmail_get_DebugLogFilePath = nil;
  CkEmail_put_DebugLogFilePath: TCkEmail_put_DebugLogFilePath = nil;
  CkEmail_get_VerboseLogging: TCkEmail_get_VerboseLogging = nil;
  CkEmail_put_VerboseLogging: TCkEmail_put_VerboseLogging = nil;
  CkEmail_get_LastMethodSuccess: TCkEmail_get_LastMethodSuccess = nil;
  CkEmail_put_LastMethodSuccess: TCkEmail_put_LastMethodSuccess = nil;
  CkEmail_get_Body: TCkEmail_get_Body = nil;
  CkEmail_put_Body: TCkEmail_put_Body = nil;
  CkEmail_get_Charset: TCkEmail_get_Charset = nil;
  CkEmail_put_Charset: TCkEmail_put_Charset = nil;
  CkEmail_get_Decrypted: TCkEmail_get_Decrypted = nil;
  CkEmail_get_EmailDateStr: TCkEmail_get_EmailDateStr = nil;
  CkEmail_put_EmailDateStr: TCkEmail_put_EmailDateStr = nil;
  CkEmail_get_EncryptedBy: TCkEmail_get_EncryptedBy = nil;
  CkEmail_get_FileDistList: TCkEmail_get_FileDistList = nil;
  CkEmail_put_FileDistList: TCkEmail_put_FileDistList = nil;
  CkEmail_get_From: TCkEmail_get_From = nil;
  CkEmail_put_From: TCkEmail_put_From = nil;
  CkEmail_get_FromAddress: TCkEmail_get_FromAddress = nil;
  CkEmail_put_FromAddress: TCkEmail_put_FromAddress = nil;
  CkEmail_get_FromName: TCkEmail_get_FromName = nil;
  CkEmail_put_FromName: TCkEmail_put_FromName = nil;
  CkEmail_get_Header: TCkEmail_get_Header = nil;
  CkEmail_get_Language: TCkEmail_get_Language = nil;
  CkEmail_get_LocalDateStr: TCkEmail_get_LocalDateStr = nil;
  CkEmail_put_LocalDateStr: TCkEmail_put_LocalDateStr = nil;
  CkEmail_get_Mailer: TCkEmail_get_Mailer = nil;
  CkEmail_put_Mailer: TCkEmail_put_Mailer = nil;
  CkEmail_get_NumAlternatives: TCkEmail_get_NumAlternatives = nil;
  CkEmail_get_NumAttachedMessages: TCkEmail_get_NumAttachedMessages = nil;
  CkEmail_get_NumAttachments: TCkEmail_get_NumAttachments = nil;
  CkEmail_get_NumBcc: TCkEmail_get_NumBcc = nil;
  CkEmail_get_NumCC: TCkEmail_get_NumCC = nil;
  CkEmail_get_NumDaysOld: TCkEmail_get_NumDaysOld = nil;
  CkEmail_get_NumHeaderFields: TCkEmail_get_NumHeaderFields = nil;
  CkEmail_get_NumRelatedItems: TCkEmail_get_NumRelatedItems = nil;
  CkEmail_get_NumReplacePatterns: TCkEmail_get_NumReplacePatterns = nil;
  CkEmail_get_NumReports: TCkEmail_get_NumReports = nil;
  CkEmail_get_NumTo: TCkEmail_get_NumTo = nil;
  CkEmail_get_OverwriteExisting: TCkEmail_get_OverwriteExisting = nil;
  CkEmail_put_OverwriteExisting: TCkEmail_put_OverwriteExisting = nil;
  CkEmail_get_Pkcs7CryptAlg: TCkEmail_get_Pkcs7CryptAlg = nil;
  CkEmail_put_Pkcs7CryptAlg: TCkEmail_put_Pkcs7CryptAlg = nil;
  CkEmail_get_Pkcs7KeyLength: TCkEmail_get_Pkcs7KeyLength = nil;
  CkEmail_put_Pkcs7KeyLength: TCkEmail_put_Pkcs7KeyLength = nil;
  CkEmail_get_PreferredCharset: TCkEmail_get_PreferredCharset = nil;
  CkEmail_put_PreferredCharset: TCkEmail_put_PreferredCharset = nil;
  CkEmail_get_PrependHeaders: TCkEmail_get_PrependHeaders = nil;
  CkEmail_put_PrependHeaders: TCkEmail_put_PrependHeaders = nil;
  CkEmail_get_ReceivedEncrypted: TCkEmail_get_ReceivedEncrypted = nil;
  CkEmail_get_ReceivedSigned: TCkEmail_get_ReceivedSigned = nil;
  CkEmail_get_ReplyTo: TCkEmail_get_ReplyTo = nil;
  CkEmail_put_ReplyTo: TCkEmail_put_ReplyTo = nil;
  CkEmail_get_ReturnReceipt: TCkEmail_get_ReturnReceipt = nil;
  CkEmail_put_ReturnReceipt: TCkEmail_put_ReturnReceipt = nil;
  CkEmail_get_SendEncrypted: TCkEmail_get_SendEncrypted = nil;
  CkEmail_put_SendEncrypted: TCkEmail_put_SendEncrypted = nil;
  CkEmail_get_SendSigned: TCkEmail_get_SendSigned = nil;
  CkEmail_put_SendSigned: TCkEmail_put_SendSigned = nil;
  CkEmail_get_SignaturesValid: TCkEmail_get_SignaturesValid = nil;
  CkEmail_get_SignedBy: TCkEmail_get_SignedBy = nil;
  CkEmail_get_SigningHashAlg: TCkEmail_get_SigningHashAlg = nil;
  CkEmail_put_SigningHashAlg: TCkEmail_put_SigningHashAlg = nil;
  CkEmail_get_Size: TCkEmail_get_Size = nil;
  CkEmail_get_Subject: TCkEmail_get_Subject = nil;
  CkEmail_put_Subject: TCkEmail_put_Subject = nil;
  CkEmail_get_Uidl: TCkEmail_get_Uidl = nil;
  CkEmail_get_UnpackUseRelPaths: TCkEmail_get_UnpackUseRelPaths = nil;
  CkEmail_put_UnpackUseRelPaths: TCkEmail_put_UnpackUseRelPaths = nil;
  CkEmail_get_NumDigests: TCkEmail_get_NumDigests = nil;
  CkEmail_get_SigningAlg: TCkEmail_get_SigningAlg = nil;
  CkEmail_put_SigningAlg: TCkEmail_put_SigningAlg = nil;
  CkEmail_get_OaepPadding: TCkEmail_get_OaepPadding = nil;
  CkEmail_put_OaepPadding: TCkEmail_put_OaepPadding = nil;
  CkEmail_get_OaepHash: TCkEmail_get_OaepHash = nil;
  CkEmail_put_OaepHash: TCkEmail_put_OaepHash = nil;
  CkEmail_get_OaepMgfHash: TCkEmail_get_OaepMgfHash = nil;
  CkEmail_put_OaepMgfHash: TCkEmail_put_OaepMgfHash = nil;
  CkEmail_get_UncommonOptions: TCkEmail_get_UncommonOptions = nil;
  CkEmail_put_UncommonOptions: TCkEmail_put_UncommonOptions = nil;
  CkEmail_AddAttachmentHeader: TCkEmail_AddAttachmentHeader = nil;
  CkEmail_AddBcc: TCkEmail_AddBcc = nil;
  CkEmail_AddCC: TCkEmail_AddCC = nil;
  CkEmail_AddEncryptCert: TCkEmail_AddEncryptCert = nil;
  CkEmail_AddFileAttachment: TCkEmail_AddFileAttachment = nil;
  CkEmail_AddFileAttachment2: TCkEmail_AddFileAttachment2 = nil;
  CkEmail_AddHeaderField: TCkEmail_AddHeaderField = nil;
  CkEmail_AddHeaderField2: TCkEmail_AddHeaderField2 = nil;
  CkEmail_AddHtmlAlternativeBody: TCkEmail_AddHtmlAlternativeBody = nil;
  CkEmail_AddMultipleBcc: TCkEmail_AddMultipleBcc = nil;
  CkEmail_AddMultipleCC: TCkEmail_AddMultipleCC = nil;
  CkEmail_AddMultipleTo: TCkEmail_AddMultipleTo = nil;
  CkEmail_AddPfxSourceFile: TCkEmail_AddPfxSourceFile = nil;
  CkEmail_AddPlainTextAlternativeBody: TCkEmail_AddPlainTextAlternativeBody = nil;
  CkEmail_AddRelatedFile: TCkEmail_AddRelatedFile = nil;
  CkEmail_AddRelatedFile2: TCkEmail_AddRelatedFile2 = nil;
  CkEmail_AddRelatedHeader: TCkEmail_AddRelatedHeader = nil;
  CkEmail_AddRelatedString: TCkEmail_AddRelatedString = nil;
  CkEmail_AddRelatedString2: TCkEmail_AddRelatedString2 = nil;
  CkEmail_AddStringAttachment: TCkEmail_AddStringAttachment = nil;
  CkEmail_AddStringAttachment2: TCkEmail_AddStringAttachment2 = nil;
  CkEmail_AddTo: TCkEmail_AddTo = nil;
  CkEmail_AddiCalendarAlternativeBody: TCkEmail_AddiCalendarAlternativeBody = nil;
  CkEmail_AesDecrypt: TCkEmail_AesDecrypt = nil;
  CkEmail_AesEncrypt: TCkEmail_AesEncrypt = nil;
  CkEmail_AppendToBody: TCkEmail_AppendToBody = nil;
  CkEmail_AspUnpack: TCkEmail_AspUnpack = nil;
  CkEmail_BEncodeString: TCkEmail_BEncodeString = nil;
  CkEmail_ClearBcc: TCkEmail_ClearBcc = nil;
  CkEmail_ClearCC: TCkEmail_ClearCC = nil;
  CkEmail_ClearEncryptCerts: TCkEmail_ClearEncryptCerts = nil;
  CkEmail_ClearTo: TCkEmail_ClearTo = nil;
  CkEmail_CreateTempMht: TCkEmail_CreateTempMht = nil;
  CkEmail_DropAttachments: TCkEmail_DropAttachments = nil;
  CkEmail_DropRelatedItem: TCkEmail_DropRelatedItem = nil;
  CkEmail_DropRelatedItems: TCkEmail_DropRelatedItems = nil;
  CkEmail_DropSingleAttachment: TCkEmail_DropSingleAttachment = nil;
  CkEmail_GenerateFilename: TCkEmail_GenerateFilename = nil;
  CkEmail_GetAltHeaderField: TCkEmail_GetAltHeaderField = nil;
  CkEmail_GetAlternativeBody: TCkEmail_GetAlternativeBody = nil;
  CkEmail_GetAlternativeBodyByContentType: TCkEmail_GetAlternativeBodyByContentType = nil;
  CkEmail_GetAlternativeContentType: TCkEmail_GetAlternativeContentType = nil;
  CkEmail_GetAttachedMessageAttr: TCkEmail_GetAttachedMessageAttr = nil;
  CkEmail_GetAttachedMessageFilename: TCkEmail_GetAttachedMessageFilename = nil;
  CkEmail_GetAttachmentAttr: TCkEmail_GetAttachmentAttr = nil;
  CkEmail_GetAttachmentContentID: TCkEmail_GetAttachmentContentID = nil;
  CkEmail_GetAttachmentContentType: TCkEmail_GetAttachmentContentType = nil;
  CkEmail_GetAttachmentFilename: TCkEmail_GetAttachmentFilename = nil;
  CkEmail_GetAttachmentHeader: TCkEmail_GetAttachmentHeader = nil;
  CkEmail_GetAttachmentSize: TCkEmail_GetAttachmentSize = nil;
  CkEmail_GetAttachmentString: TCkEmail_GetAttachmentString = nil;
  CkEmail_GetAttachmentStringCrLf: TCkEmail_GetAttachmentStringCrLf = nil;
  CkEmail_GetBcc: TCkEmail_GetBcc = nil;
  CkEmail_GetBccAddr: TCkEmail_GetBccAddr = nil;
  CkEmail_GetBccName: TCkEmail_GetBccName = nil;
  CkEmail_GetCC: TCkEmail_GetCC = nil;
  CkEmail_GetCcAddr: TCkEmail_GetCcAddr = nil;
  CkEmail_GetCcName: TCkEmail_GetCcName = nil;
  CkEmail_GetDeliveryStatusInfo: TCkEmail_GetDeliveryStatusInfo = nil;
  CkEmail_GetHeaderField: TCkEmail_GetHeaderField = nil;
  CkEmail_GetHeaderFieldName: TCkEmail_GetHeaderFieldName = nil;
  CkEmail_GetHeaderFieldValue: TCkEmail_GetHeaderFieldValue = nil;
  CkEmail_GetHtmlBody: TCkEmail_GetHtmlBody = nil;
  CkEmail_GetImapUid: TCkEmail_GetImapUid = nil;
  CkEmail_GetMime: TCkEmail_GetMime = nil;
  CkEmail_GetNthTextPartOfType: TCkEmail_GetNthTextPartOfType = nil;
  CkEmail_GetNumPartsOfType: TCkEmail_GetNumPartsOfType = nil;
  CkEmail_GetPlainTextBody: TCkEmail_GetPlainTextBody = nil;
  CkEmail_GetRelatedAttr: TCkEmail_GetRelatedAttr = nil;
  CkEmail_GetRelatedContentID: TCkEmail_GetRelatedContentID = nil;
  CkEmail_GetRelatedContentLocation: TCkEmail_GetRelatedContentLocation = nil;
  CkEmail_GetRelatedContentType: TCkEmail_GetRelatedContentType = nil;
  CkEmail_GetRelatedFilename: TCkEmail_GetRelatedFilename = nil;
  CkEmail_GetRelatedString: TCkEmail_GetRelatedString = nil;
  CkEmail_GetRelatedStringCrLf: TCkEmail_GetRelatedStringCrLf = nil;
  CkEmail_GetReplacePattern: TCkEmail_GetReplacePattern = nil;
  CkEmail_GetReplaceString: TCkEmail_GetReplaceString = nil;
  CkEmail_GetReplaceString2: TCkEmail_GetReplaceString2 = nil;
  CkEmail_GetReport: TCkEmail_GetReport = nil;
  CkEmail_GetTo: TCkEmail_GetTo = nil;
  CkEmail_GetToAddr: TCkEmail_GetToAddr = nil;
  CkEmail_GetToName: TCkEmail_GetToName = nil;
  CkEmail_GetXml: TCkEmail_GetXml = nil;
  CkEmail_HasHeaderMatching: TCkEmail_HasHeaderMatching = nil;
  CkEmail_HasHtmlBody: TCkEmail_HasHtmlBody = nil;
  CkEmail_HasPlainTextBody: TCkEmail_HasPlainTextBody = nil;
  CkEmail_IsMultipartReport: TCkEmail_IsMultipartReport = nil;
  CkEmail_LoadEml: TCkEmail_LoadEml = nil;
  CkEmail_LoadXml: TCkEmail_LoadXml = nil;
  CkEmail_LoadXmlString: TCkEmail_LoadXmlString = nil;
  CkEmail_QEncodeString: TCkEmail_QEncodeString = nil;
  CkEmail_RemoveAttachedMessage: TCkEmail_RemoveAttachedMessage = nil;
  CkEmail_RemoveAttachedMessages: TCkEmail_RemoveAttachedMessages = nil;
  CkEmail_RemoveAttachmentPaths: TCkEmail_RemoveAttachmentPaths = nil;
  CkEmail_RemoveHeaderField: TCkEmail_RemoveHeaderField = nil;
  CkEmail_RemoveHtmlAlternative: TCkEmail_RemoveHtmlAlternative = nil;
  CkEmail_RemovePlainTextAlternative: TCkEmail_RemovePlainTextAlternative = nil;
  CkEmail_SaveAllAttachments: TCkEmail_SaveAllAttachments = nil;
  CkEmail_SaveAttachedFile: TCkEmail_SaveAttachedFile = nil;
  CkEmail_SaveEml: TCkEmail_SaveEml = nil;
  CkEmail_SaveRelatedItem: TCkEmail_SaveRelatedItem = nil;
  CkEmail_SaveXml: TCkEmail_SaveXml = nil;
  CkEmail_SetAttachmentCharset: TCkEmail_SetAttachmentCharset = nil;
  CkEmail_SetAttachmentDisposition: TCkEmail_SetAttachmentDisposition = nil;
  CkEmail_SetAttachmentFilename: TCkEmail_SetAttachmentFilename = nil;
  CkEmail_SetDecryptCert: TCkEmail_SetDecryptCert = nil;
  CkEmail_SetDecryptCert2: TCkEmail_SetDecryptCert2 = nil;
  CkEmail_SetDt: TCkEmail_SetDt = nil;
  CkEmail_SetEdifactBody: TCkEmail_SetEdifactBody = nil;
  CkEmail_SetEncryptCert: TCkEmail_SetEncryptCert = nil;
  CkEmail_SetFromMimeText: TCkEmail_SetFromMimeText = nil;
  CkEmail_SetFromXmlText: TCkEmail_SetFromXmlText = nil;
  CkEmail_SetHtmlBody: TCkEmail_SetHtmlBody = nil;
  CkEmail_SetRelatedFilename: TCkEmail_SetRelatedFilename = nil;
  CkEmail_SetReplacePattern: TCkEmail_SetReplacePattern = nil;
  CkEmail_SetSigningCert: TCkEmail_SetSigningCert = nil;
  CkEmail_SetSigningCert2: TCkEmail_SetSigningCert2 = nil;
  CkEmail_SetTextBody: TCkEmail_SetTextBody = nil;
  CkEmail_UidlEquals: TCkEmail_UidlEquals = nil;
  CkEmail_UnSpamify: TCkEmail_UnSpamify = nil;
  CkEmail_UnpackHtml: TCkEmail_UnpackHtml = nil;
  CkEmail_UnzipAttachments: TCkEmail_UnzipAttachments = nil;
  CkEmail_UseCertVault: TCkEmail_UseCertVault = nil;
  CkEmail_ZipAttachments: TCkEmail_ZipAttachments = nil;
  CkEmail_ComputeGlobalKey2: TCkEmail_ComputeGlobalKey2 = nil;
  CkEmail_GetMimeSb: TCkEmail_GetMimeSb = nil;
  CkEmail_GetMimeBd: TCkEmail_GetMimeBd = nil;
  CkEmail_SetFromMimeSb: TCkEmail_SetFromMimeSb = nil;
  CkEmail_SetFromMimeBd: TCkEmail_SetFromMimeBd = nil;
  CkEmail_AddAttachmentBd: TCkEmail_AddAttachmentBd = nil;
  CkEmail_AddRelatedBd: TCkEmail_AddRelatedBd = nil;
  CkEmail_AddRelatedBd2: TCkEmail_AddRelatedBd2 = nil;
  CkEmail_GetAttachmentBd: TCkEmail_GetAttachmentBd = nil;
  CkEmail_GetAlternativeBodyBd: TCkEmail_GetAlternativeBodyBd = nil;
  CkEmail_ApplyFixups: TCkEmail_ApplyFixups = nil;
  CkEmail_Clear: TCkEmail_Clear = nil;
  CkEmail_ConvertInlineImages: TCkEmail_ConvertInlineImages = nil;
  CkEmail_AttachEmail: TCkEmail_AttachEmail = nil;
  CkEmail_GetNthContentType: TCkEmail_GetNthContentType = nil;
  CkEmail_GetNthBinaryPartOfTypeBd: TCkEmail_GetNthBinaryPartOfTypeBd = nil;
  CkEmail_GetRelatedHeader: TCkEmail_GetRelatedHeader = nil;
  CkEmail_GetHtmlBodySb: TCkEmail_GetHtmlBodySb = nil;
  CkEmail_LastDecryptCert: TCkEmail_LastDecryptCert = nil;
  CkEmail_LastSignerCert: TCkEmail_LastSignerCert = nil;
  CkEmail_MakeCopy: TCkEmail_MakeCopy = nil;
  CkEmail_ToDsn: TCkEmail_ToDsn = nil;
  CkEmail_ToForward: TCkEmail_ToForward = nil;
  CkEmail_ToMdn: TCkEmail_ToMdn = nil;
  CkEmail_ToReply: TCkEmail_ToReply = nil;
  CkEmail_GetAttachedEmail: TCkEmail_GetAttachedEmail = nil;
  CkEmail_GetDigestEmail: TCkEmail_GetDigestEmail = nil;
  CkEmail_GetDsnInfo: TCkEmail_GetDsnInfo = nil;
  CkEmail_LinkedDomains: TCkEmail_LinkedDomains = nil;
  CkEmail_AddPfxSourceBd: TCkEmail_AddPfxSourceBd = nil;
  CkEmail_SetBodyBd: TCkEmail_SetBodyBd = nil;

constructor TEmail.Create;
begin
  inherited Create;
  FHandle := CkEmail_Create();
end;

destructor TEmail.Destroy;
begin
  if FHandle <> nil then
    CkEmail_Dispose(FHandle);
  FHandle := nil;
  inherited;
end;

function TEmail.GetLastErrorHtml: string;
begin
  Result := CkToStr(CkEmail_get_LastErrorHtml(FHandle));
end;

function TEmail.GetLastErrorText: string;
begin
  Result := CkToStr(CkEmail_get_LastErrorText(FHandle));
end;

function TEmail.GetLastErrorXml: string;
begin
  Result := CkToStr(CkEmail_get_LastErrorXml(FHandle));
end;

function TEmail.GetVersion: string;
begin
  Result := CkToStr(CkEmail_get_Version(FHandle));
end;

function TEmail.GetDebugLogFilePath: string;
begin
  Result := CkToStr(CkEmail_get_DebugLogFilePath(FHandle));
end;

procedure TEmail.SetDebugLogFilePath(AValue: string);
begin
  CkEmail_put_DebugLogFilePath(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TEmail.GetVerboseLogging: Boolean;
begin
  Result := Boolean(CkEmail_get_VerboseLogging(FHandle));
end;

procedure TEmail.SetVerboseLogging(AValue: Boolean);
begin
  CkEmail_put_VerboseLogging(FHandle, LongBool(AValue));
end;

function TEmail.GetLastMethodSuccess: Boolean;
begin
  Result := Boolean(CkEmail_get_LastMethodSuccess(FHandle));
end;

procedure TEmail.SetLastMethodSuccess(AValue: Boolean);
begin
  CkEmail_put_LastMethodSuccess(FHandle, LongBool(AValue));
end;

function TEmail.GetBody: string;
begin
  Result := CkToStr(CkEmail_get_Body(FHandle));
end;

procedure TEmail.SetBody(AValue: string);
begin
  CkEmail_put_Body(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TEmail.GetCharset: string;
begin
  Result := CkToStr(CkEmail_get_Charset(FHandle));
end;

procedure TEmail.SetCharset(AValue: string);
begin
  CkEmail_put_Charset(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TEmail.GetDecrypted: Boolean;
begin
  Result := Boolean(CkEmail_get_Decrypted(FHandle));
end;

function TEmail.GetEmailDateStr: string;
begin
  Result := CkToStr(CkEmail_get_EmailDateStr(FHandle));
end;

procedure TEmail.SetEmailDateStr(AValue: string);
begin
  CkEmail_put_EmailDateStr(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TEmail.GetEncryptedBy: string;
begin
  Result := CkToStr(CkEmail_get_EncryptedBy(FHandle));
end;

function TEmail.GetFileDistList: string;
begin
  Result := CkToStr(CkEmail_get_FileDistList(FHandle));
end;

procedure TEmail.SetFileDistList(AValue: string);
begin
  CkEmail_put_FileDistList(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TEmail.GetFrom: string;
begin
  Result := CkToStr(CkEmail_get_From(FHandle));
end;

procedure TEmail.SetFrom(AValue: string);
begin
  CkEmail_put_From(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TEmail.GetFromAddress: string;
begin
  Result := CkToStr(CkEmail_get_FromAddress(FHandle));
end;

procedure TEmail.SetFromAddress(AValue: string);
begin
  CkEmail_put_FromAddress(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TEmail.GetFromName: string;
begin
  Result := CkToStr(CkEmail_get_FromName(FHandle));
end;

procedure TEmail.SetFromName(AValue: string);
begin
  CkEmail_put_FromName(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TEmail.GetHeader: string;
begin
  Result := CkToStr(CkEmail_get_Header(FHandle));
end;

function TEmail.GetLanguage: string;
begin
  Result := CkToStr(CkEmail_get_Language(FHandle));
end;

function TEmail.GetLocalDateStr: string;
begin
  Result := CkToStr(CkEmail_get_LocalDateStr(FHandle));
end;

procedure TEmail.SetLocalDateStr(AValue: string);
begin
  CkEmail_put_LocalDateStr(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TEmail.GetMailer: string;
begin
  Result := CkToStr(CkEmail_get_Mailer(FHandle));
end;

procedure TEmail.SetMailer(AValue: string);
begin
  CkEmail_put_Mailer(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TEmail.GetNumAlternatives: Integer;
begin
  Result := CkEmail_get_NumAlternatives(FHandle);
end;

function TEmail.GetNumAttachedMessages: Integer;
begin
  Result := CkEmail_get_NumAttachedMessages(FHandle);
end;

function TEmail.GetNumAttachments: Integer;
begin
  Result := CkEmail_get_NumAttachments(FHandle);
end;

function TEmail.GetNumBcc: Integer;
begin
  Result := CkEmail_get_NumBcc(FHandle);
end;

function TEmail.GetNumCC: Integer;
begin
  Result := CkEmail_get_NumCC(FHandle);
end;

function TEmail.GetNumDaysOld: Integer;
begin
  Result := CkEmail_get_NumDaysOld(FHandle);
end;

function TEmail.GetNumHeaderFields: Integer;
begin
  Result := CkEmail_get_NumHeaderFields(FHandle);
end;

function TEmail.GetNumRelatedItems: Integer;
begin
  Result := CkEmail_get_NumRelatedItems(FHandle);
end;

function TEmail.GetNumReplacePatterns: Integer;
begin
  Result := CkEmail_get_NumReplacePatterns(FHandle);
end;

function TEmail.GetNumReports: Integer;
begin
  Result := CkEmail_get_NumReports(FHandle);
end;

function TEmail.GetNumTo: Integer;
begin
  Result := CkEmail_get_NumTo(FHandle);
end;

function TEmail.GetOverwriteExisting: Boolean;
begin
  Result := Boolean(CkEmail_get_OverwriteExisting(FHandle));
end;

procedure TEmail.SetOverwriteExisting(AValue: Boolean);
begin
  CkEmail_put_OverwriteExisting(FHandle, LongBool(AValue));
end;

function TEmail.GetPkcs7CryptAlg: string;
begin
  Result := CkToStr(CkEmail_get_Pkcs7CryptAlg(FHandle));
end;

procedure TEmail.SetPkcs7CryptAlg(AValue: string);
begin
  CkEmail_put_Pkcs7CryptAlg(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TEmail.GetPkcs7KeyLength: Integer;
begin
  Result := CkEmail_get_Pkcs7KeyLength(FHandle);
end;

procedure TEmail.SetPkcs7KeyLength(AValue: Integer);
begin
  CkEmail_put_Pkcs7KeyLength(FHandle, AValue);
end;

function TEmail.GetPreferredCharset: string;
begin
  Result := CkToStr(CkEmail_get_PreferredCharset(FHandle));
end;

procedure TEmail.SetPreferredCharset(AValue: string);
begin
  CkEmail_put_PreferredCharset(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TEmail.GetPrependHeaders: Boolean;
begin
  Result := Boolean(CkEmail_get_PrependHeaders(FHandle));
end;

procedure TEmail.SetPrependHeaders(AValue: Boolean);
begin
  CkEmail_put_PrependHeaders(FHandle, LongBool(AValue));
end;

function TEmail.GetReceivedEncrypted: Boolean;
begin
  Result := Boolean(CkEmail_get_ReceivedEncrypted(FHandle));
end;

function TEmail.GetReceivedSigned: Boolean;
begin
  Result := Boolean(CkEmail_get_ReceivedSigned(FHandle));
end;

function TEmail.GetReplyTo: string;
begin
  Result := CkToStr(CkEmail_get_ReplyTo(FHandle));
end;

procedure TEmail.SetReplyTo(AValue: string);
begin
  CkEmail_put_ReplyTo(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TEmail.GetReturnReceipt: Boolean;
begin
  Result := Boolean(CkEmail_get_ReturnReceipt(FHandle));
end;

procedure TEmail.SetReturnReceipt(AValue: Boolean);
begin
  CkEmail_put_ReturnReceipt(FHandle, LongBool(AValue));
end;

function TEmail.GetSendEncrypted: Boolean;
begin
  Result := Boolean(CkEmail_get_SendEncrypted(FHandle));
end;

procedure TEmail.SetSendEncrypted(AValue: Boolean);
begin
  CkEmail_put_SendEncrypted(FHandle, LongBool(AValue));
end;

function TEmail.GetSendSigned: Boolean;
begin
  Result := Boolean(CkEmail_get_SendSigned(FHandle));
end;

procedure TEmail.SetSendSigned(AValue: Boolean);
begin
  CkEmail_put_SendSigned(FHandle, LongBool(AValue));
end;

function TEmail.GetSignaturesValid: Boolean;
begin
  Result := Boolean(CkEmail_get_SignaturesValid(FHandle));
end;

function TEmail.GetSignedBy: string;
begin
  Result := CkToStr(CkEmail_get_SignedBy(FHandle));
end;

function TEmail.GetSigningHashAlg: string;
begin
  Result := CkToStr(CkEmail_get_SigningHashAlg(FHandle));
end;

procedure TEmail.SetSigningHashAlg(AValue: string);
begin
  CkEmail_put_SigningHashAlg(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TEmail.GetSize: Integer;
begin
  Result := CkEmail_get_Size(FHandle);
end;

function TEmail.GetSubject: string;
begin
  Result := CkToStr(CkEmail_get_Subject(FHandle));
end;

procedure TEmail.SetSubject(AValue: string);
begin
  CkEmail_put_Subject(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TEmail.GetUidl: string;
begin
  Result := CkToStr(CkEmail_get_Uidl(FHandle));
end;

function TEmail.GetUnpackUseRelPaths: Boolean;
begin
  Result := Boolean(CkEmail_get_UnpackUseRelPaths(FHandle));
end;

procedure TEmail.SetUnpackUseRelPaths(AValue: Boolean);
begin
  CkEmail_put_UnpackUseRelPaths(FHandle, LongBool(AValue));
end;

function TEmail.GetNumDigests: Integer;
begin
  Result := CkEmail_get_NumDigests(FHandle);
end;

function TEmail.GetSigningAlg: string;
begin
  Result := CkToStr(CkEmail_get_SigningAlg(FHandle));
end;

procedure TEmail.SetSigningAlg(AValue: string);
begin
  CkEmail_put_SigningAlg(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TEmail.GetOaepPadding: Boolean;
begin
  Result := Boolean(CkEmail_get_OaepPadding(FHandle));
end;

procedure TEmail.SetOaepPadding(AValue: Boolean);
begin
  CkEmail_put_OaepPadding(FHandle, LongBool(AValue));
end;

function TEmail.GetOaepHash: string;
begin
  Result := CkToStr(CkEmail_get_OaepHash(FHandle));
end;

procedure TEmail.SetOaepHash(AValue: string);
begin
  CkEmail_put_OaepHash(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TEmail.GetOaepMgfHash: string;
begin
  Result := CkToStr(CkEmail_get_OaepMgfHash(FHandle));
end;

procedure TEmail.SetOaepMgfHash(AValue: string);
begin
  CkEmail_put_OaepMgfHash(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TEmail.GetUncommonOptions: string;
begin
  Result := CkToStr(CkEmail_get_UncommonOptions(FHandle));
end;

procedure TEmail.SetUncommonOptions(AValue: string);
begin
  CkEmail_put_UncommonOptions(FHandle, PAnsiChar(StrToCk(AValue)));
end;

procedure TEmail.AddAttachmentHeader(index: Integer; const fieldName: string; const fieldValue: string);
begin
  CkEmail_AddAttachmentHeader(FHandle, index, PAnsiChar(StrToCk(fieldName)), PAnsiChar(StrToCk(fieldValue)));
end;

function TEmail.AddBcc(const friendlyName: string; const emailAddress: string): Boolean;
begin
  Result := Boolean(CkEmail_AddBcc(FHandle, PAnsiChar(StrToCk(friendlyName)), PAnsiChar(StrToCk(emailAddress))));
end;

function TEmail.AddCC(const friendlyName: string; const emailAddress: string): Boolean;
begin
  Result := Boolean(CkEmail_AddCC(FHandle, PAnsiChar(StrToCk(friendlyName)), PAnsiChar(StrToCk(emailAddress))));
end;

function TEmail.AddEncryptCert(cert: TChilkatBase): Boolean;
begin
  Result := Boolean(CkEmail_AddEncryptCert(FHandle, cert.Handle));
end;

function TEmail.AddFileAttachment(const path: string): string;
begin
  Result := CkToStr(CkEmail_AddFileAttachment(FHandle, PAnsiChar(StrToCk(path))));
end;

function TEmail.AddFileAttachment2(const path: string; const contentType: string): Boolean;
begin
  Result := Boolean(CkEmail_AddFileAttachment2(FHandle, PAnsiChar(StrToCk(path)), PAnsiChar(StrToCk(contentType))));
end;

procedure TEmail.AddHeaderField(const fieldName: string; const fieldValue: string);
begin
  CkEmail_AddHeaderField(FHandle, PAnsiChar(StrToCk(fieldName)), PAnsiChar(StrToCk(fieldValue)));
end;

procedure TEmail.AddHeaderField2(const fieldName: string; const fieldValue: string);
begin
  CkEmail_AddHeaderField2(FHandle, PAnsiChar(StrToCk(fieldName)), PAnsiChar(StrToCk(fieldValue)));
end;

function TEmail.AddHtmlAlternativeBody(const body: string): Boolean;
begin
  Result := Boolean(CkEmail_AddHtmlAlternativeBody(FHandle, PAnsiChar(StrToCk(body))));
end;

function TEmail.AddMultipleBcc(const commaSeparatedAddresses: string): Boolean;
begin
  Result := Boolean(CkEmail_AddMultipleBcc(FHandle, PAnsiChar(StrToCk(commaSeparatedAddresses))));
end;

function TEmail.AddMultipleCC(const commaSeparatedAddresses: string): Boolean;
begin
  Result := Boolean(CkEmail_AddMultipleCC(FHandle, PAnsiChar(StrToCk(commaSeparatedAddresses))));
end;

function TEmail.AddMultipleTo(const commaSeparatedAddresses: string): Boolean;
begin
  Result := Boolean(CkEmail_AddMultipleTo(FHandle, PAnsiChar(StrToCk(commaSeparatedAddresses))));
end;

function TEmail.AddPfxSourceFile(const pfxFilePath: string; const pfxPassword: string): Boolean;
begin
  Result := Boolean(CkEmail_AddPfxSourceFile(FHandle, PAnsiChar(StrToCk(pfxFilePath)), PAnsiChar(StrToCk(pfxPassword))));
end;

function TEmail.AddPlainTextAlternativeBody(const body: string): Boolean;
begin
  Result := Boolean(CkEmail_AddPlainTextAlternativeBody(FHandle, PAnsiChar(StrToCk(body))));
end;

function TEmail.AddRelatedFile(const path: string): string;
begin
  Result := CkToStr(CkEmail_AddRelatedFile(FHandle, PAnsiChar(StrToCk(path))));
end;

function TEmail.AddRelatedFile2(const filenameOnDisk: string; const filenameInHtml: string): Boolean;
begin
  Result := Boolean(CkEmail_AddRelatedFile2(FHandle, PAnsiChar(StrToCk(filenameOnDisk)), PAnsiChar(StrToCk(filenameInHtml))));
end;

procedure TEmail.AddRelatedHeader(index: Integer; const fieldName: string; const fieldValue: string);
begin
  CkEmail_AddRelatedHeader(FHandle, index, PAnsiChar(StrToCk(fieldName)), PAnsiChar(StrToCk(fieldValue)));
end;

function TEmail.AddRelatedString(const nameInHtml: string; const str: string; const charset: string): string;
begin
  Result := CkToStr(CkEmail_AddRelatedString(FHandle, PAnsiChar(StrToCk(nameInHtml)), PAnsiChar(StrToCk(str)), PAnsiChar(StrToCk(charset))));
end;

procedure TEmail.AddRelatedString2(const fileNameInHtml: string; const content: string; const charset: string);
begin
  CkEmail_AddRelatedString2(FHandle, PAnsiChar(StrToCk(fileNameInHtml)), PAnsiChar(StrToCk(content)), PAnsiChar(StrToCk(charset)));
end;

function TEmail.AddStringAttachment(const path: string; const content: string): Boolean;
begin
  Result := Boolean(CkEmail_AddStringAttachment(FHandle, PAnsiChar(StrToCk(path)), PAnsiChar(StrToCk(content))));
end;

function TEmail.AddStringAttachment2(const path: string; const content: string; const charset: string): Boolean;
begin
  Result := Boolean(CkEmail_AddStringAttachment2(FHandle, PAnsiChar(StrToCk(path)), PAnsiChar(StrToCk(content)), PAnsiChar(StrToCk(charset))));
end;

function TEmail.AddTo(const friendlyName: string; const emailAddress: string): Boolean;
begin
  Result := Boolean(CkEmail_AddTo(FHandle, PAnsiChar(StrToCk(friendlyName)), PAnsiChar(StrToCk(emailAddress))));
end;

function TEmail.AddiCalendarAlternativeBody(const icalContent: string; const methodName: string): Boolean;
begin
  Result := Boolean(CkEmail_AddiCalendarAlternativeBody(FHandle, PAnsiChar(StrToCk(icalContent)), PAnsiChar(StrToCk(methodName))));
end;

function TEmail.AesDecrypt(const password: string): Boolean;
begin
  Result := Boolean(CkEmail_AesDecrypt(FHandle, PAnsiChar(StrToCk(password))));
end;

function TEmail.AesEncrypt(const password: string): Boolean;
begin
  Result := Boolean(CkEmail_AesEncrypt(FHandle, PAnsiChar(StrToCk(password))));
end;

procedure TEmail.AppendToBody(const str: string);
begin
  CkEmail_AppendToBody(FHandle, PAnsiChar(StrToCk(str)));
end;

function TEmail.AspUnpack(const prefix: string; const saveDir: string; const urlPath: string; cleanFiles: Boolean): Boolean;
begin
  Result := Boolean(CkEmail_AspUnpack(FHandle, PAnsiChar(StrToCk(prefix)), PAnsiChar(StrToCk(saveDir)), PAnsiChar(StrToCk(urlPath)), LongBool(cleanFiles)));
end;

function TEmail.BEncodeString(const str: string; const charset: string): string;
begin
  Result := CkToStr(CkEmail_BEncodeString(FHandle, PAnsiChar(StrToCk(str)), PAnsiChar(StrToCk(charset))));
end;

procedure TEmail.ClearBcc;
begin
  CkEmail_ClearBcc(FHandle);
end;

procedure TEmail.ClearCC;
begin
  CkEmail_ClearCC(FHandle);
end;

procedure TEmail.ClearEncryptCerts;
begin
  CkEmail_ClearEncryptCerts(FHandle);
end;

procedure TEmail.ClearTo;
begin
  CkEmail_ClearTo(FHandle);
end;

function TEmail.CreateTempMht(const inFilename: string): string;
begin
  Result := CkToStr(CkEmail_CreateTempMht(FHandle, PAnsiChar(StrToCk(inFilename))));
end;

procedure TEmail.DropAttachments;
begin
  CkEmail_DropAttachments(FHandle);
end;

procedure TEmail.DropRelatedItem(index: Integer);
begin
  CkEmail_DropRelatedItem(FHandle, index);
end;

procedure TEmail.DropRelatedItems;
begin
  CkEmail_DropRelatedItems(FHandle);
end;

function TEmail.DropSingleAttachment(index: Integer): Boolean;
begin
  Result := Boolean(CkEmail_DropSingleAttachment(FHandle, index));
end;

function TEmail.GenerateFilename: string;
begin
  Result := CkToStr(CkEmail_GenerateFilename(FHandle));
end;

function TEmail.GetAltHeaderField(index: Integer; const fieldName: string): string;
begin
  Result := CkToStr(CkEmail_GetAltHeaderField(FHandle, index, PAnsiChar(StrToCk(fieldName))));
end;

function TEmail.GetAlternativeBody(index: Integer): string;
begin
  Result := CkToStr(CkEmail_GetAlternativeBody(FHandle, index));
end;

function TEmail.GetAlternativeBodyByContentType(const contentType: string): string;
begin
  Result := CkToStr(CkEmail_GetAlternativeBodyByContentType(FHandle, PAnsiChar(StrToCk(contentType))));
end;

function TEmail.GetAlternativeContentType(index: Integer): string;
begin
  Result := CkToStr(CkEmail_GetAlternativeContentType(FHandle, index));
end;

function TEmail.GetAttachedMessageAttr(index: Integer; const fieldName: string; const attrName: string): string;
begin
  Result := CkToStr(CkEmail_GetAttachedMessageAttr(FHandle, index, PAnsiChar(StrToCk(fieldName)), PAnsiChar(StrToCk(attrName))));
end;

function TEmail.GetAttachedMessageFilename(index: Integer): string;
begin
  Result := CkToStr(CkEmail_GetAttachedMessageFilename(FHandle, index));
end;

function TEmail.GetAttachmentAttr(index: Integer; const fieldName: string; const attrName: string): string;
begin
  Result := CkToStr(CkEmail_GetAttachmentAttr(FHandle, index, PAnsiChar(StrToCk(fieldName)), PAnsiChar(StrToCk(attrName))));
end;

function TEmail.GetAttachmentContentID(index: Integer): string;
begin
  Result := CkToStr(CkEmail_GetAttachmentContentID(FHandle, index));
end;

function TEmail.GetAttachmentContentType(index: Integer): string;
begin
  Result := CkToStr(CkEmail_GetAttachmentContentType(FHandle, index));
end;

function TEmail.GetAttachmentFilename(index: Integer): string;
begin
  Result := CkToStr(CkEmail_GetAttachmentFilename(FHandle, index));
end;

function TEmail.GetAttachmentHeader(attachIndex: Integer; const fieldName: string): string;
begin
  Result := CkToStr(CkEmail_GetAttachmentHeader(FHandle, attachIndex, PAnsiChar(StrToCk(fieldName))));
end;

function TEmail.GetAttachmentSize(index: Integer): Integer;
begin
  Result := CkEmail_GetAttachmentSize(FHandle, index);
end;

function TEmail.GetAttachmentString(index: Integer; const charset: string): string;
begin
  Result := CkToStr(CkEmail_GetAttachmentString(FHandle, index, PAnsiChar(StrToCk(charset))));
end;

function TEmail.GetAttachmentStringCrLf(index: Integer; const charset: string): string;
begin
  Result := CkToStr(CkEmail_GetAttachmentStringCrLf(FHandle, index, PAnsiChar(StrToCk(charset))));
end;

function TEmail.GetBcc(index: Integer): string;
begin
  Result := CkToStr(CkEmail_GetBcc(FHandle, index));
end;

function TEmail.GetBccAddr(index: Integer): string;
begin
  Result := CkToStr(CkEmail_GetBccAddr(FHandle, index));
end;

function TEmail.GetBccName(index: Integer): string;
begin
  Result := CkToStr(CkEmail_GetBccName(FHandle, index));
end;

function TEmail.GetCC(index: Integer): string;
begin
  Result := CkToStr(CkEmail_GetCC(FHandle, index));
end;

function TEmail.GetCcAddr(index: Integer): string;
begin
  Result := CkToStr(CkEmail_GetCcAddr(FHandle, index));
end;

function TEmail.GetCcName(index: Integer): string;
begin
  Result := CkToStr(CkEmail_GetCcName(FHandle, index));
end;

function TEmail.GetDeliveryStatusInfo(const fieldName: string): string;
begin
  Result := CkToStr(CkEmail_GetDeliveryStatusInfo(FHandle, PAnsiChar(StrToCk(fieldName))));
end;

function TEmail.GetHeaderField(const fieldName: string): string;
begin
  Result := CkToStr(CkEmail_GetHeaderField(FHandle, PAnsiChar(StrToCk(fieldName))));
end;

function TEmail.GetHeaderFieldName(index: Integer): string;
begin
  Result := CkToStr(CkEmail_GetHeaderFieldName(FHandle, index));
end;

function TEmail.GetHeaderFieldValue(index: Integer): string;
begin
  Result := CkToStr(CkEmail_GetHeaderFieldValue(FHandle, index));
end;

function TEmail.GetHtmlBody: string;
begin
  Result := CkToStr(CkEmail_GetHtmlBody(FHandle));
end;

function TEmail.GetImapUid: LongWord;
begin
  Result := CkEmail_GetImapUid(FHandle);
end;

function TEmail.GetMime: string;
begin
  Result := CkToStr(CkEmail_GetMime(FHandle));
end;

function TEmail.GetNthTextPartOfType(index: Integer; const contentType: string; inlineOnly: Boolean; excludeAttachments: Boolean): string;
begin
  Result := CkToStr(CkEmail_GetNthTextPartOfType(FHandle, index, PAnsiChar(StrToCk(contentType)), LongBool(inlineOnly), LongBool(excludeAttachments)));
end;

function TEmail.GetNumPartsOfType(const contentType: string; inlineOnly: Boolean; excludeAttachments: Boolean): Integer;
begin
  Result := CkEmail_GetNumPartsOfType(FHandle, PAnsiChar(StrToCk(contentType)), LongBool(inlineOnly), LongBool(excludeAttachments));
end;

function TEmail.GetPlainTextBody: string;
begin
  Result := CkToStr(CkEmail_GetPlainTextBody(FHandle));
end;

function TEmail.GetRelatedAttr(index: Integer; const fieldName: string; const attrName: string): string;
begin
  Result := CkToStr(CkEmail_GetRelatedAttr(FHandle, index, PAnsiChar(StrToCk(fieldName)), PAnsiChar(StrToCk(attrName))));
end;

function TEmail.GetRelatedContentID(index: Integer): string;
begin
  Result := CkToStr(CkEmail_GetRelatedContentID(FHandle, index));
end;

function TEmail.GetRelatedContentLocation(index: Integer): string;
begin
  Result := CkToStr(CkEmail_GetRelatedContentLocation(FHandle, index));
end;

function TEmail.GetRelatedContentType(index: Integer): string;
begin
  Result := CkToStr(CkEmail_GetRelatedContentType(FHandle, index));
end;

function TEmail.GetRelatedFilename(index: Integer): string;
begin
  Result := CkToStr(CkEmail_GetRelatedFilename(FHandle, index));
end;

function TEmail.GetRelatedString(index: Integer; const charset: string): string;
begin
  Result := CkToStr(CkEmail_GetRelatedString(FHandle, index, PAnsiChar(StrToCk(charset))));
end;

function TEmail.GetRelatedStringCrLf(index: Integer; const charset: string): string;
begin
  Result := CkToStr(CkEmail_GetRelatedStringCrLf(FHandle, index, PAnsiChar(StrToCk(charset))));
end;

function TEmail.GetReplacePattern(index: Integer): string;
begin
  Result := CkToStr(CkEmail_GetReplacePattern(FHandle, index));
end;

function TEmail.GetReplaceString(index: Integer): string;
begin
  Result := CkToStr(CkEmail_GetReplaceString(FHandle, index));
end;

function TEmail.GetReplaceString2(const pattern: string): string;
begin
  Result := CkToStr(CkEmail_GetReplaceString2(FHandle, PAnsiChar(StrToCk(pattern))));
end;

function TEmail.GetReport(index: Integer): string;
begin
  Result := CkToStr(CkEmail_GetReport(FHandle, index));
end;

function TEmail.GetTo(index: Integer): string;
begin
  Result := CkToStr(CkEmail_GetTo(FHandle, index));
end;

function TEmail.GetToAddr(index: Integer): string;
begin
  Result := CkToStr(CkEmail_GetToAddr(FHandle, index));
end;

function TEmail.GetToName(index: Integer): string;
begin
  Result := CkToStr(CkEmail_GetToName(FHandle, index));
end;

function TEmail.GetXml: string;
begin
  Result := CkToStr(CkEmail_GetXml(FHandle));
end;

function TEmail.HasHeaderMatching(const fieldName: string; const valuePattern: string; caseSensitive: Boolean): Boolean;
begin
  Result := Boolean(CkEmail_HasHeaderMatching(FHandle, PAnsiChar(StrToCk(fieldName)), PAnsiChar(StrToCk(valuePattern)), LongBool(caseSensitive)));
end;

function TEmail.HasHtmlBody: Boolean;
begin
  Result := Boolean(CkEmail_HasHtmlBody(FHandle));
end;

function TEmail.HasPlainTextBody: Boolean;
begin
  Result := Boolean(CkEmail_HasPlainTextBody(FHandle));
end;

function TEmail.IsMultipartReport: Boolean;
begin
  Result := Boolean(CkEmail_IsMultipartReport(FHandle));
end;

function TEmail.LoadEml(const mimePath: string): Boolean;
begin
  Result := Boolean(CkEmail_LoadEml(FHandle, PAnsiChar(StrToCk(mimePath))));
end;

function TEmail.LoadXml(const xmlPath: string): Boolean;
begin
  Result := Boolean(CkEmail_LoadXml(FHandle, PAnsiChar(StrToCk(xmlPath))));
end;

function TEmail.LoadXmlString(const xmlStr: string): Boolean;
begin
  Result := Boolean(CkEmail_LoadXmlString(FHandle, PAnsiChar(StrToCk(xmlStr))));
end;

function TEmail.QEncodeString(const str: string; const charset: string): string;
begin
  Result := CkToStr(CkEmail_QEncodeString(FHandle, PAnsiChar(StrToCk(str)), PAnsiChar(StrToCk(charset))));
end;

procedure TEmail.RemoveAttachedMessage(idx: Integer);
begin
  CkEmail_RemoveAttachedMessage(FHandle, idx);
end;

procedure TEmail.RemoveAttachedMessages;
begin
  CkEmail_RemoveAttachedMessages(FHandle);
end;

procedure TEmail.RemoveAttachmentPaths;
begin
  CkEmail_RemoveAttachmentPaths(FHandle);
end;

procedure TEmail.RemoveHeaderField(const fieldName: string);
begin
  CkEmail_RemoveHeaderField(FHandle, PAnsiChar(StrToCk(fieldName)));
end;

procedure TEmail.RemoveHtmlAlternative;
begin
  CkEmail_RemoveHtmlAlternative(FHandle);
end;

procedure TEmail.RemovePlainTextAlternative;
begin
  CkEmail_RemovePlainTextAlternative(FHandle);
end;

function TEmail.SaveAllAttachments(const dirPath: string): Boolean;
begin
  Result := Boolean(CkEmail_SaveAllAttachments(FHandle, PAnsiChar(StrToCk(dirPath))));
end;

function TEmail.SaveAttachedFile(index: Integer; const dirPath: string): Boolean;
begin
  Result := Boolean(CkEmail_SaveAttachedFile(FHandle, index, PAnsiChar(StrToCk(dirPath))));
end;

function TEmail.SaveEml(const emlFilePath: string): Boolean;
begin
  Result := Boolean(CkEmail_SaveEml(FHandle, PAnsiChar(StrToCk(emlFilePath))));
end;

function TEmail.SaveRelatedItem(index: Integer; const dirPath: string): Boolean;
begin
  Result := Boolean(CkEmail_SaveRelatedItem(FHandle, index, PAnsiChar(StrToCk(dirPath))));
end;

function TEmail.SaveXml(const path: string): Boolean;
begin
  Result := Boolean(CkEmail_SaveXml(FHandle, PAnsiChar(StrToCk(path))));
end;

function TEmail.SetAttachmentCharset(index: Integer; const charset: string): Boolean;
begin
  Result := Boolean(CkEmail_SetAttachmentCharset(FHandle, index, PAnsiChar(StrToCk(charset))));
end;

function TEmail.SetAttachmentDisposition(index: Integer; const disposition: string): Boolean;
begin
  Result := Boolean(CkEmail_SetAttachmentDisposition(FHandle, index, PAnsiChar(StrToCk(disposition))));
end;

function TEmail.SetAttachmentFilename(index: Integer; const filename: string): Boolean;
begin
  Result := Boolean(CkEmail_SetAttachmentFilename(FHandle, index, PAnsiChar(StrToCk(filename))));
end;

function TEmail.SetDecryptCert(cert: TChilkatBase): Boolean;
begin
  Result := Boolean(CkEmail_SetDecryptCert(FHandle, cert.Handle));
end;

function TEmail.SetDecryptCert2(cert: TChilkatBase; key: TChilkatBase): Boolean;
begin
  Result := Boolean(CkEmail_SetDecryptCert2(FHandle, cert.Handle, key.Handle));
end;

function TEmail.SetDt(dt: TChilkatBase): Boolean;
begin
  Result := Boolean(CkEmail_SetDt(FHandle, dt.Handle));
end;

procedure TEmail.SetEdifactBody(const message: string; const name: string; const filename: string; const charset: string);
begin
  CkEmail_SetEdifactBody(FHandle, PAnsiChar(StrToCk(message)), PAnsiChar(StrToCk(name)), PAnsiChar(StrToCk(filename)), PAnsiChar(StrToCk(charset)));
end;

function TEmail.SetEncryptCert(cert: TChilkatBase): Boolean;
begin
  Result := Boolean(CkEmail_SetEncryptCert(FHandle, cert.Handle));
end;

function TEmail.SetFromMimeText(const mimeText: string): Boolean;
begin
  Result := Boolean(CkEmail_SetFromMimeText(FHandle, PAnsiChar(StrToCk(mimeText))));
end;

function TEmail.SetFromXmlText(const xmlStr: string): Boolean;
begin
  Result := Boolean(CkEmail_SetFromXmlText(FHandle, PAnsiChar(StrToCk(xmlStr))));
end;

procedure TEmail.SetHtmlBody(const html: string);
begin
  CkEmail_SetHtmlBody(FHandle, PAnsiChar(StrToCk(html)));
end;

function TEmail.SetRelatedFilename(index: Integer; const path: string): Boolean;
begin
  Result := Boolean(CkEmail_SetRelatedFilename(FHandle, index, PAnsiChar(StrToCk(path))));
end;

function TEmail.SetReplacePattern(const pattern: string; const replaceString: string): Boolean;
begin
  Result := Boolean(CkEmail_SetReplacePattern(FHandle, PAnsiChar(StrToCk(pattern)), PAnsiChar(StrToCk(replaceString))));
end;

function TEmail.SetSigningCert(cert: TChilkatBase): Boolean;
begin
  Result := Boolean(CkEmail_SetSigningCert(FHandle, cert.Handle));
end;

function TEmail.SetSigningCert2(cert: TChilkatBase; key: TChilkatBase): Boolean;
begin
  Result := Boolean(CkEmail_SetSigningCert2(FHandle, cert.Handle, key.Handle));
end;

procedure TEmail.SetTextBody(const bodyText: string; const contentType: string);
begin
  CkEmail_SetTextBody(FHandle, PAnsiChar(StrToCk(bodyText)), PAnsiChar(StrToCk(contentType)));
end;

function TEmail.UidlEquals(e: TChilkatBase): Boolean;
begin
  Result := Boolean(CkEmail_UidlEquals(FHandle, e.Handle));
end;

procedure TEmail.UnSpamify;
begin
  CkEmail_UnSpamify(FHandle);
end;

function TEmail.UnpackHtml(const unpackDir: string; const htmlFilename: string; const partsSubdir: string): Boolean;
begin
  Result := Boolean(CkEmail_UnpackHtml(FHandle, PAnsiChar(StrToCk(unpackDir)), PAnsiChar(StrToCk(htmlFilename)), PAnsiChar(StrToCk(partsSubdir))));
end;

function TEmail.UnzipAttachments: Boolean;
begin
  Result := Boolean(CkEmail_UnzipAttachments(FHandle));
end;

function TEmail.UseCertVault(vault: TChilkatBase): Boolean;
begin
  Result := Boolean(CkEmail_UseCertVault(FHandle, vault.Handle));
end;

function TEmail.ZipAttachments(const zipFilename: string): Boolean;
begin
  Result := Boolean(CkEmail_ZipAttachments(FHandle, PAnsiChar(StrToCk(zipFilename))));
end;

function TEmail.ComputeGlobalKey2(const encoding: string; bFold: Boolean): string;
begin
  Result := CkToStr(CkEmail_ComputeGlobalKey2(FHandle, PAnsiChar(StrToCk(encoding)), LongBool(bFold)));
end;

function TEmail.GetMimeSb(sb: TChilkatBase): Boolean;
begin
  Result := Boolean(CkEmail_GetMimeSb(FHandle, sb.Handle));
end;

function TEmail.GetMimeBd(bindat: TChilkatBase): Boolean;
begin
  Result := Boolean(CkEmail_GetMimeBd(FHandle, bindat.Handle));
end;

function TEmail.SetFromMimeSb(sb: TChilkatBase): Boolean;
begin
  Result := Boolean(CkEmail_SetFromMimeSb(FHandle, sb.Handle));
end;

function TEmail.SetFromMimeBd(bindat: TChilkatBase): Boolean;
begin
  Result := Boolean(CkEmail_SetFromMimeBd(FHandle, bindat.Handle));
end;

function TEmail.AddAttachmentBd(const filename: string; binData: TChilkatBase; const contentType: string): Boolean;
begin
  Result := Boolean(CkEmail_AddAttachmentBd(FHandle, PAnsiChar(StrToCk(filename)), binData.Handle, PAnsiChar(StrToCk(contentType))));
end;

function TEmail.AddRelatedBd(const filename: string; binData: TChilkatBase): string;
begin
  Result := CkToStr(CkEmail_AddRelatedBd(FHandle, PAnsiChar(StrToCk(filename)), binData.Handle));
end;

function TEmail.AddRelatedBd2(binData: TChilkatBase; const fileNameInHtml: string): Boolean;
begin
  Result := Boolean(CkEmail_AddRelatedBd2(FHandle, binData.Handle, PAnsiChar(StrToCk(fileNameInHtml))));
end;

function TEmail.GetAttachmentBd(index: Integer; binData: TChilkatBase): Boolean;
begin
  Result := Boolean(CkEmail_GetAttachmentBd(FHandle, index, binData.Handle));
end;

function TEmail.GetAlternativeBodyBd(index: Integer; binData: TChilkatBase): Boolean;
begin
  Result := Boolean(CkEmail_GetAlternativeBodyBd(FHandle, index, binData.Handle));
end;

function TEmail.ApplyFixups(const fixups: string): Boolean;
begin
  Result := Boolean(CkEmail_ApplyFixups(FHandle, PAnsiChar(StrToCk(fixups))));
end;

procedure TEmail.Clear;
begin
  CkEmail_Clear(FHandle);
end;

function TEmail.ConvertInlineImages: Boolean;
begin
  Result := Boolean(CkEmail_ConvertInlineImages(FHandle));
end;

function TEmail.AttachEmail(email: TChilkatBase): Boolean;
begin
  Result := Boolean(CkEmail_AttachEmail(FHandle, email.Handle));
end;

function TEmail.GetNthContentType(index: Integer; const contentType: string; inlineOnly: Boolean; excludeAttachments: Boolean): string;
begin
  Result := CkToStr(CkEmail_GetNthContentType(FHandle, index, PAnsiChar(StrToCk(contentType)), LongBool(inlineOnly), LongBool(excludeAttachments)));
end;

function TEmail.GetNthBinaryPartOfTypeBd(index: Integer; const contentType: string; inlineOnly: Boolean; excludeAttachments: Boolean; bd: TChilkatBase): Boolean;
begin
  Result := Boolean(CkEmail_GetNthBinaryPartOfTypeBd(FHandle, index, PAnsiChar(StrToCk(contentType)), LongBool(inlineOnly), LongBool(excludeAttachments), bd.Handle));
end;

function TEmail.GetRelatedHeader(index: Integer; const fieldName: string): string;
begin
  Result := CkToStr(CkEmail_GetRelatedHeader(FHandle, index, PAnsiChar(StrToCk(fieldName))));
end;

function TEmail.GetHtmlBodySb(inlineImageData: Boolean; sb: TChilkatBase): Boolean;
begin
  Result := Boolean(CkEmail_GetHtmlBodySb(FHandle, LongBool(inlineImageData), sb.Handle));
end;

function TEmail.LastDecryptCert(cert: TChilkatBase): Boolean;
begin
  Result := Boolean(CkEmail_LastDecryptCert(FHandle, cert.Handle));
end;

function TEmail.LastSignerCert(index: Integer; cert: TChilkatBase): Boolean;
begin
  Result := Boolean(CkEmail_LastSignerCert(FHandle, index, cert.Handle));
end;

function TEmail.MakeCopy(destEmail: TChilkatBase): Boolean;
begin
  Result := Boolean(CkEmail_MakeCopy(FHandle, destEmail.Handle));
end;

function TEmail.ToDsn(const explanation: string; const statusFields: string; headerOnly: Boolean; dsnEmail: TChilkatBase): Boolean;
begin
  Result := Boolean(CkEmail_ToDsn(FHandle, PAnsiChar(StrToCk(explanation)), PAnsiChar(StrToCk(statusFields)), LongBool(headerOnly), dsnEmail.Handle));
end;

function TEmail.ToForward(forward: TChilkatBase): Boolean;
begin
  Result := Boolean(CkEmail_ToForward(FHandle, forward.Handle));
end;

function TEmail.ToMdn(const message: string; const statusFields: string; headerOnly: Boolean; mdn: TChilkatBase): Boolean;
begin
  Result := Boolean(CkEmail_ToMdn(FHandle, PAnsiChar(StrToCk(message)), PAnsiChar(StrToCk(statusFields)), LongBool(headerOnly), mdn.Handle));
end;

function TEmail.ToReply(reply: TChilkatBase): Boolean;
begin
  Result := Boolean(CkEmail_ToReply(FHandle, reply.Handle));
end;

function TEmail.GetAttachedEmail(index: Integer; email: TChilkatBase): Boolean;
begin
  Result := Boolean(CkEmail_GetAttachedEmail(FHandle, index, email.Handle));
end;

function TEmail.GetDigestEmail(index: Integer; email: TChilkatBase): Boolean;
begin
  Result := Boolean(CkEmail_GetDigestEmail(FHandle, index, email.Handle));
end;

function TEmail.GetDsnInfo(json: TChilkatBase): Boolean;
begin
  Result := Boolean(CkEmail_GetDsnInfo(FHandle, json.Handle));
end;

function TEmail.LinkedDomains(domains: TChilkatBase): Boolean;
begin
  Result := Boolean(CkEmail_LinkedDomains(FHandle, domains.Handle));
end;

function TEmail.AddPfxSourceBd(bd: TChilkatBase; const password: string): Boolean;
begin
  Result := Boolean(CkEmail_AddPfxSourceBd(FHandle, bd.Handle, PAnsiChar(StrToCk(password))));
end;

function TEmail.SetBodyBd(bd: TChilkatBase; const contentType: string; const disposition: string; const filename: string): Boolean;
begin
  Result := Boolean(CkEmail_SetBodyBd(FHandle, bd.Handle, PAnsiChar(StrToCk(contentType)), PAnsiChar(StrToCk(disposition)), PAnsiChar(StrToCk(filename))));
end;

initialization
  Chilkat_GetProcedureAddress(CkEmail_Create,  'CkEmail_Create');
  Chilkat_GetProcedureAddress(CkEmail_Dispose, 'CkEmail_Dispose');
  Chilkat_GetProcedureAddress(CkEmail_get_LastErrorHtml, 'CkEmail_get_LastErrorHtml');
  Chilkat_GetProcedureAddress(CkEmail_get_LastErrorText, 'CkEmail_get_LastErrorText');
  Chilkat_GetProcedureAddress(CkEmail_get_LastErrorXml, 'CkEmail_get_LastErrorXml');
  Chilkat_GetProcedureAddress(CkEmail_get_Version, 'CkEmail_get_Version');
  Chilkat_GetProcedureAddress(CkEmail_get_DebugLogFilePath, 'CkEmail_get_DebugLogFilePath');
  Chilkat_GetProcedureAddress(CkEmail_put_DebugLogFilePath, 'CkEmail_put_DebugLogFilePath');
  Chilkat_GetProcedureAddress(CkEmail_get_VerboseLogging, 'CkEmail_get_VerboseLogging');
  Chilkat_GetProcedureAddress(CkEmail_put_VerboseLogging, 'CkEmail_put_VerboseLogging');
  Chilkat_GetProcedureAddress(CkEmail_get_LastMethodSuccess, 'CkEmail_get_LastMethodSuccess');
  Chilkat_GetProcedureAddress(CkEmail_put_LastMethodSuccess, 'CkEmail_put_LastMethodSuccess');
  Chilkat_GetProcedureAddress(CkEmail_get_Body, 'CkEmail_get_Body');
  Chilkat_GetProcedureAddress(CkEmail_put_Body, 'CkEmail_put_Body');
  Chilkat_GetProcedureAddress(CkEmail_get_Charset, 'CkEmail_get_Charset');
  Chilkat_GetProcedureAddress(CkEmail_put_Charset, 'CkEmail_put_Charset');
  Chilkat_GetProcedureAddress(CkEmail_get_Decrypted, 'CkEmail_get_Decrypted');
  Chilkat_GetProcedureAddress(CkEmail_get_EmailDateStr, 'CkEmail_get_EmailDateStr');
  Chilkat_GetProcedureAddress(CkEmail_put_EmailDateStr, 'CkEmail_put_EmailDateStr');
  Chilkat_GetProcedureAddress(CkEmail_get_EncryptedBy, 'CkEmail_get_EncryptedBy');
  Chilkat_GetProcedureAddress(CkEmail_get_FileDistList, 'CkEmail_get_FileDistList');
  Chilkat_GetProcedureAddress(CkEmail_put_FileDistList, 'CkEmail_put_FileDistList');
  Chilkat_GetProcedureAddress(CkEmail_get_From, 'CkEmail_get_From');
  Chilkat_GetProcedureAddress(CkEmail_put_From, 'CkEmail_put_From');
  Chilkat_GetProcedureAddress(CkEmail_get_FromAddress, 'CkEmail_get_FromAddress');
  Chilkat_GetProcedureAddress(CkEmail_put_FromAddress, 'CkEmail_put_FromAddress');
  Chilkat_GetProcedureAddress(CkEmail_get_FromName, 'CkEmail_get_FromName');
  Chilkat_GetProcedureAddress(CkEmail_put_FromName, 'CkEmail_put_FromName');
  Chilkat_GetProcedureAddress(CkEmail_get_Header, 'CkEmail_get_Header');
  Chilkat_GetProcedureAddress(CkEmail_get_Language, 'CkEmail_get_Language');
  Chilkat_GetProcedureAddress(CkEmail_get_LocalDateStr, 'CkEmail_get_LocalDateStr');
  Chilkat_GetProcedureAddress(CkEmail_put_LocalDateStr, 'CkEmail_put_LocalDateStr');
  Chilkat_GetProcedureAddress(CkEmail_get_Mailer, 'CkEmail_get_Mailer');
  Chilkat_GetProcedureAddress(CkEmail_put_Mailer, 'CkEmail_put_Mailer');
  Chilkat_GetProcedureAddress(CkEmail_get_NumAlternatives, 'CkEmail_get_NumAlternatives');
  Chilkat_GetProcedureAddress(CkEmail_get_NumAttachedMessages, 'CkEmail_get_NumAttachedMessages');
  Chilkat_GetProcedureAddress(CkEmail_get_NumAttachments, 'CkEmail_get_NumAttachments');
  Chilkat_GetProcedureAddress(CkEmail_get_NumBcc, 'CkEmail_get_NumBcc');
  Chilkat_GetProcedureAddress(CkEmail_get_NumCC, 'CkEmail_get_NumCC');
  Chilkat_GetProcedureAddress(CkEmail_get_NumDaysOld, 'CkEmail_get_NumDaysOld');
  Chilkat_GetProcedureAddress(CkEmail_get_NumHeaderFields, 'CkEmail_get_NumHeaderFields');
  Chilkat_GetProcedureAddress(CkEmail_get_NumRelatedItems, 'CkEmail_get_NumRelatedItems');
  Chilkat_GetProcedureAddress(CkEmail_get_NumReplacePatterns, 'CkEmail_get_NumReplacePatterns');
  Chilkat_GetProcedureAddress(CkEmail_get_NumReports, 'CkEmail_get_NumReports');
  Chilkat_GetProcedureAddress(CkEmail_get_NumTo, 'CkEmail_get_NumTo');
  Chilkat_GetProcedureAddress(CkEmail_get_OverwriteExisting, 'CkEmail_get_OverwriteExisting');
  Chilkat_GetProcedureAddress(CkEmail_put_OverwriteExisting, 'CkEmail_put_OverwriteExisting');
  Chilkat_GetProcedureAddress(CkEmail_get_Pkcs7CryptAlg, 'CkEmail_get_Pkcs7CryptAlg');
  Chilkat_GetProcedureAddress(CkEmail_put_Pkcs7CryptAlg, 'CkEmail_put_Pkcs7CryptAlg');
  Chilkat_GetProcedureAddress(CkEmail_get_Pkcs7KeyLength, 'CkEmail_get_Pkcs7KeyLength');
  Chilkat_GetProcedureAddress(CkEmail_put_Pkcs7KeyLength, 'CkEmail_put_Pkcs7KeyLength');
  Chilkat_GetProcedureAddress(CkEmail_get_PreferredCharset, 'CkEmail_get_PreferredCharset');
  Chilkat_GetProcedureAddress(CkEmail_put_PreferredCharset, 'CkEmail_put_PreferredCharset');
  Chilkat_GetProcedureAddress(CkEmail_get_PrependHeaders, 'CkEmail_get_PrependHeaders');
  Chilkat_GetProcedureAddress(CkEmail_put_PrependHeaders, 'CkEmail_put_PrependHeaders');
  Chilkat_GetProcedureAddress(CkEmail_get_ReceivedEncrypted, 'CkEmail_get_ReceivedEncrypted');
  Chilkat_GetProcedureAddress(CkEmail_get_ReceivedSigned, 'CkEmail_get_ReceivedSigned');
  Chilkat_GetProcedureAddress(CkEmail_get_ReplyTo, 'CkEmail_get_ReplyTo');
  Chilkat_GetProcedureAddress(CkEmail_put_ReplyTo, 'CkEmail_put_ReplyTo');
  Chilkat_GetProcedureAddress(CkEmail_get_ReturnReceipt, 'CkEmail_get_ReturnReceipt');
  Chilkat_GetProcedureAddress(CkEmail_put_ReturnReceipt, 'CkEmail_put_ReturnReceipt');
  Chilkat_GetProcedureAddress(CkEmail_get_SendEncrypted, 'CkEmail_get_SendEncrypted');
  Chilkat_GetProcedureAddress(CkEmail_put_SendEncrypted, 'CkEmail_put_SendEncrypted');
  Chilkat_GetProcedureAddress(CkEmail_get_SendSigned, 'CkEmail_get_SendSigned');
  Chilkat_GetProcedureAddress(CkEmail_put_SendSigned, 'CkEmail_put_SendSigned');
  Chilkat_GetProcedureAddress(CkEmail_get_SignaturesValid, 'CkEmail_get_SignaturesValid');
  Chilkat_GetProcedureAddress(CkEmail_get_SignedBy, 'CkEmail_get_SignedBy');
  Chilkat_GetProcedureAddress(CkEmail_get_SigningHashAlg, 'CkEmail_get_SigningHashAlg');
  Chilkat_GetProcedureAddress(CkEmail_put_SigningHashAlg, 'CkEmail_put_SigningHashAlg');
  Chilkat_GetProcedureAddress(CkEmail_get_Size, 'CkEmail_get_Size');
  Chilkat_GetProcedureAddress(CkEmail_get_Subject, 'CkEmail_get_Subject');
  Chilkat_GetProcedureAddress(CkEmail_put_Subject, 'CkEmail_put_Subject');
  Chilkat_GetProcedureAddress(CkEmail_get_Uidl, 'CkEmail_get_Uidl');
  Chilkat_GetProcedureAddress(CkEmail_get_UnpackUseRelPaths, 'CkEmail_get_UnpackUseRelPaths');
  Chilkat_GetProcedureAddress(CkEmail_put_UnpackUseRelPaths, 'CkEmail_put_UnpackUseRelPaths');
  Chilkat_GetProcedureAddress(CkEmail_get_NumDigests, 'CkEmail_get_NumDigests');
  Chilkat_GetProcedureAddress(CkEmail_get_SigningAlg, 'CkEmail_get_SigningAlg');
  Chilkat_GetProcedureAddress(CkEmail_put_SigningAlg, 'CkEmail_put_SigningAlg');
  Chilkat_GetProcedureAddress(CkEmail_get_OaepPadding, 'CkEmail_get_OaepPadding');
  Chilkat_GetProcedureAddress(CkEmail_put_OaepPadding, 'CkEmail_put_OaepPadding');
  Chilkat_GetProcedureAddress(CkEmail_get_OaepHash, 'CkEmail_get_OaepHash');
  Chilkat_GetProcedureAddress(CkEmail_put_OaepHash, 'CkEmail_put_OaepHash');
  Chilkat_GetProcedureAddress(CkEmail_get_OaepMgfHash, 'CkEmail_get_OaepMgfHash');
  Chilkat_GetProcedureAddress(CkEmail_put_OaepMgfHash, 'CkEmail_put_OaepMgfHash');
  Chilkat_GetProcedureAddress(CkEmail_get_UncommonOptions, 'CkEmail_get_UncommonOptions');
  Chilkat_GetProcedureAddress(CkEmail_put_UncommonOptions, 'CkEmail_put_UncommonOptions');
  Chilkat_GetProcedureAddress(CkEmail_AddAttachmentHeader, 'CkEmail_AddAttachmentHeader');
  Chilkat_GetProcedureAddress(CkEmail_AddBcc, 'CkEmail_AddBcc');
  Chilkat_GetProcedureAddress(CkEmail_AddCC, 'CkEmail_AddCC');
  Chilkat_GetProcedureAddress(CkEmail_AddEncryptCert, 'CkEmail_AddEncryptCert');
  Chilkat_GetProcedureAddress(CkEmail_AddFileAttachment, 'CkEmail_AddFileAttachment');
  Chilkat_GetProcedureAddress(CkEmail_AddFileAttachment2, 'CkEmail_AddFileAttachment2');
  Chilkat_GetProcedureAddress(CkEmail_AddHeaderField, 'CkEmail_AddHeaderField');
  Chilkat_GetProcedureAddress(CkEmail_AddHeaderField2, 'CkEmail_AddHeaderField2');
  Chilkat_GetProcedureAddress(CkEmail_AddHtmlAlternativeBody, 'CkEmail_AddHtmlAlternativeBody');
  Chilkat_GetProcedureAddress(CkEmail_AddMultipleBcc, 'CkEmail_AddMultipleBcc');
  Chilkat_GetProcedureAddress(CkEmail_AddMultipleCC, 'CkEmail_AddMultipleCC');
  Chilkat_GetProcedureAddress(CkEmail_AddMultipleTo, 'CkEmail_AddMultipleTo');
  Chilkat_GetProcedureAddress(CkEmail_AddPfxSourceFile, 'CkEmail_AddPfxSourceFile');
  Chilkat_GetProcedureAddress(CkEmail_AddPlainTextAlternativeBody, 'CkEmail_AddPlainTextAlternativeBody');
  Chilkat_GetProcedureAddress(CkEmail_AddRelatedFile, 'CkEmail_AddRelatedFile');
  Chilkat_GetProcedureAddress(CkEmail_AddRelatedFile2, 'CkEmail_AddRelatedFile2');
  Chilkat_GetProcedureAddress(CkEmail_AddRelatedHeader, 'CkEmail_AddRelatedHeader');
  Chilkat_GetProcedureAddress(CkEmail_AddRelatedString, 'CkEmail_AddRelatedString');
  Chilkat_GetProcedureAddress(CkEmail_AddRelatedString2, 'CkEmail_AddRelatedString2');
  Chilkat_GetProcedureAddress(CkEmail_AddStringAttachment, 'CkEmail_AddStringAttachment');
  Chilkat_GetProcedureAddress(CkEmail_AddStringAttachment2, 'CkEmail_AddStringAttachment2');
  Chilkat_GetProcedureAddress(CkEmail_AddTo, 'CkEmail_AddTo');
  Chilkat_GetProcedureAddress(CkEmail_AddiCalendarAlternativeBody, 'CkEmail_AddiCalendarAlternativeBody');
  Chilkat_GetProcedureAddress(CkEmail_AesDecrypt, 'CkEmail_AesDecrypt');
  Chilkat_GetProcedureAddress(CkEmail_AesEncrypt, 'CkEmail_AesEncrypt');
  Chilkat_GetProcedureAddress(CkEmail_AppendToBody, 'CkEmail_AppendToBody');
  Chilkat_GetProcedureAddress(CkEmail_AspUnpack, 'CkEmail_AspUnpack');
  Chilkat_GetProcedureAddress(CkEmail_BEncodeString, 'CkEmail_BEncodeString');
  Chilkat_GetProcedureAddress(CkEmail_ClearBcc, 'CkEmail_ClearBcc');
  Chilkat_GetProcedureAddress(CkEmail_ClearCC, 'CkEmail_ClearCC');
  Chilkat_GetProcedureAddress(CkEmail_ClearEncryptCerts, 'CkEmail_ClearEncryptCerts');
  Chilkat_GetProcedureAddress(CkEmail_ClearTo, 'CkEmail_ClearTo');
  Chilkat_GetProcedureAddress(CkEmail_CreateTempMht, 'CkEmail_CreateTempMht');
  Chilkat_GetProcedureAddress(CkEmail_DropAttachments, 'CkEmail_DropAttachments');
  Chilkat_GetProcedureAddress(CkEmail_DropRelatedItem, 'CkEmail_DropRelatedItem');
  Chilkat_GetProcedureAddress(CkEmail_DropRelatedItems, 'CkEmail_DropRelatedItems');
  Chilkat_GetProcedureAddress(CkEmail_DropSingleAttachment, 'CkEmail_DropSingleAttachment');
  Chilkat_GetProcedureAddress(CkEmail_GenerateFilename, 'CkEmail_GenerateFilename');
  Chilkat_GetProcedureAddress(CkEmail_GetAltHeaderField, 'CkEmail_GetAltHeaderField');
  Chilkat_GetProcedureAddress(CkEmail_GetAlternativeBody, 'CkEmail_GetAlternativeBody');
  Chilkat_GetProcedureAddress(CkEmail_GetAlternativeBodyByContentType, 'CkEmail_GetAlternativeBodyByContentType');
  Chilkat_GetProcedureAddress(CkEmail_GetAlternativeContentType, 'CkEmail_GetAlternativeContentType');
  Chilkat_GetProcedureAddress(CkEmail_GetAttachedMessageAttr, 'CkEmail_GetAttachedMessageAttr');
  Chilkat_GetProcedureAddress(CkEmail_GetAttachedMessageFilename, 'CkEmail_GetAttachedMessageFilename');
  Chilkat_GetProcedureAddress(CkEmail_GetAttachmentAttr, 'CkEmail_GetAttachmentAttr');
  Chilkat_GetProcedureAddress(CkEmail_GetAttachmentContentID, 'CkEmail_GetAttachmentContentID');
  Chilkat_GetProcedureAddress(CkEmail_GetAttachmentContentType, 'CkEmail_GetAttachmentContentType');
  Chilkat_GetProcedureAddress(CkEmail_GetAttachmentFilename, 'CkEmail_GetAttachmentFilename');
  Chilkat_GetProcedureAddress(CkEmail_GetAttachmentHeader, 'CkEmail_GetAttachmentHeader');
  Chilkat_GetProcedureAddress(CkEmail_GetAttachmentSize, 'CkEmail_GetAttachmentSize');
  Chilkat_GetProcedureAddress(CkEmail_GetAttachmentString, 'CkEmail_GetAttachmentString');
  Chilkat_GetProcedureAddress(CkEmail_GetAttachmentStringCrLf, 'CkEmail_GetAttachmentStringCrLf');
  Chilkat_GetProcedureAddress(CkEmail_GetBcc, 'CkEmail_GetBcc');
  Chilkat_GetProcedureAddress(CkEmail_GetBccAddr, 'CkEmail_GetBccAddr');
  Chilkat_GetProcedureAddress(CkEmail_GetBccName, 'CkEmail_GetBccName');
  Chilkat_GetProcedureAddress(CkEmail_GetCC, 'CkEmail_GetCC');
  Chilkat_GetProcedureAddress(CkEmail_GetCcAddr, 'CkEmail_GetCcAddr');
  Chilkat_GetProcedureAddress(CkEmail_GetCcName, 'CkEmail_GetCcName');
  Chilkat_GetProcedureAddress(CkEmail_GetDeliveryStatusInfo, 'CkEmail_GetDeliveryStatusInfo');
  Chilkat_GetProcedureAddress(CkEmail_GetHeaderField, 'CkEmail_GetHeaderField');
  Chilkat_GetProcedureAddress(CkEmail_GetHeaderFieldName, 'CkEmail_GetHeaderFieldName');
  Chilkat_GetProcedureAddress(CkEmail_GetHeaderFieldValue, 'CkEmail_GetHeaderFieldValue');
  Chilkat_GetProcedureAddress(CkEmail_GetHtmlBody, 'CkEmail_GetHtmlBody');
  Chilkat_GetProcedureAddress(CkEmail_GetImapUid, 'CkEmail_GetImapUid');
  Chilkat_GetProcedureAddress(CkEmail_GetMime, 'CkEmail_GetMime');
  Chilkat_GetProcedureAddress(CkEmail_GetNthTextPartOfType, 'CkEmail_GetNthTextPartOfType');
  Chilkat_GetProcedureAddress(CkEmail_GetNumPartsOfType, 'CkEmail_GetNumPartsOfType');
  Chilkat_GetProcedureAddress(CkEmail_GetPlainTextBody, 'CkEmail_GetPlainTextBody');
  Chilkat_GetProcedureAddress(CkEmail_GetRelatedAttr, 'CkEmail_GetRelatedAttr');
  Chilkat_GetProcedureAddress(CkEmail_GetRelatedContentID, 'CkEmail_GetRelatedContentID');
  Chilkat_GetProcedureAddress(CkEmail_GetRelatedContentLocation, 'CkEmail_GetRelatedContentLocation');
  Chilkat_GetProcedureAddress(CkEmail_GetRelatedContentType, 'CkEmail_GetRelatedContentType');
  Chilkat_GetProcedureAddress(CkEmail_GetRelatedFilename, 'CkEmail_GetRelatedFilename');
  Chilkat_GetProcedureAddress(CkEmail_GetRelatedString, 'CkEmail_GetRelatedString');
  Chilkat_GetProcedureAddress(CkEmail_GetRelatedStringCrLf, 'CkEmail_GetRelatedStringCrLf');
  Chilkat_GetProcedureAddress(CkEmail_GetReplacePattern, 'CkEmail_GetReplacePattern');
  Chilkat_GetProcedureAddress(CkEmail_GetReplaceString, 'CkEmail_GetReplaceString');
  Chilkat_GetProcedureAddress(CkEmail_GetReplaceString2, 'CkEmail_GetReplaceString2');
  Chilkat_GetProcedureAddress(CkEmail_GetReport, 'CkEmail_GetReport');
  Chilkat_GetProcedureAddress(CkEmail_GetTo, 'CkEmail_GetTo');
  Chilkat_GetProcedureAddress(CkEmail_GetToAddr, 'CkEmail_GetToAddr');
  Chilkat_GetProcedureAddress(CkEmail_GetToName, 'CkEmail_GetToName');
  Chilkat_GetProcedureAddress(CkEmail_GetXml, 'CkEmail_GetXml');
  Chilkat_GetProcedureAddress(CkEmail_HasHeaderMatching, 'CkEmail_HasHeaderMatching');
  Chilkat_GetProcedureAddress(CkEmail_HasHtmlBody, 'CkEmail_HasHtmlBody');
  Chilkat_GetProcedureAddress(CkEmail_HasPlainTextBody, 'CkEmail_HasPlainTextBody');
  Chilkat_GetProcedureAddress(CkEmail_IsMultipartReport, 'CkEmail_IsMultipartReport');
  Chilkat_GetProcedureAddress(CkEmail_LoadEml, 'CkEmail_LoadEml');
  Chilkat_GetProcedureAddress(CkEmail_LoadXml, 'CkEmail_LoadXml');
  Chilkat_GetProcedureAddress(CkEmail_LoadXmlString, 'CkEmail_LoadXmlString');
  Chilkat_GetProcedureAddress(CkEmail_QEncodeString, 'CkEmail_QEncodeString');
  Chilkat_GetProcedureAddress(CkEmail_RemoveAttachedMessage, 'CkEmail_RemoveAttachedMessage');
  Chilkat_GetProcedureAddress(CkEmail_RemoveAttachedMessages, 'CkEmail_RemoveAttachedMessages');
  Chilkat_GetProcedureAddress(CkEmail_RemoveAttachmentPaths, 'CkEmail_RemoveAttachmentPaths');
  Chilkat_GetProcedureAddress(CkEmail_RemoveHeaderField, 'CkEmail_RemoveHeaderField');
  Chilkat_GetProcedureAddress(CkEmail_RemoveHtmlAlternative, 'CkEmail_RemoveHtmlAlternative');
  Chilkat_GetProcedureAddress(CkEmail_RemovePlainTextAlternative, 'CkEmail_RemovePlainTextAlternative');
  Chilkat_GetProcedureAddress(CkEmail_SaveAllAttachments, 'CkEmail_SaveAllAttachments');
  Chilkat_GetProcedureAddress(CkEmail_SaveAttachedFile, 'CkEmail_SaveAttachedFile');
  Chilkat_GetProcedureAddress(CkEmail_SaveEml, 'CkEmail_SaveEml');
  Chilkat_GetProcedureAddress(CkEmail_SaveRelatedItem, 'CkEmail_SaveRelatedItem');
  Chilkat_GetProcedureAddress(CkEmail_SaveXml, 'CkEmail_SaveXml');
  Chilkat_GetProcedureAddress(CkEmail_SetAttachmentCharset, 'CkEmail_SetAttachmentCharset');
  Chilkat_GetProcedureAddress(CkEmail_SetAttachmentDisposition, 'CkEmail_SetAttachmentDisposition');
  Chilkat_GetProcedureAddress(CkEmail_SetAttachmentFilename, 'CkEmail_SetAttachmentFilename');
  Chilkat_GetProcedureAddress(CkEmail_SetDecryptCert, 'CkEmail_SetDecryptCert');
  Chilkat_GetProcedureAddress(CkEmail_SetDecryptCert2, 'CkEmail_SetDecryptCert2');
  Chilkat_GetProcedureAddress(CkEmail_SetDt, 'CkEmail_SetDt');
  Chilkat_GetProcedureAddress(CkEmail_SetEdifactBody, 'CkEmail_SetEdifactBody');
  Chilkat_GetProcedureAddress(CkEmail_SetEncryptCert, 'CkEmail_SetEncryptCert');
  Chilkat_GetProcedureAddress(CkEmail_SetFromMimeText, 'CkEmail_SetFromMimeText');
  Chilkat_GetProcedureAddress(CkEmail_SetFromXmlText, 'CkEmail_SetFromXmlText');
  Chilkat_GetProcedureAddress(CkEmail_SetHtmlBody, 'CkEmail_SetHtmlBody');
  Chilkat_GetProcedureAddress(CkEmail_SetRelatedFilename, 'CkEmail_SetRelatedFilename');
  Chilkat_GetProcedureAddress(CkEmail_SetReplacePattern, 'CkEmail_SetReplacePattern');
  Chilkat_GetProcedureAddress(CkEmail_SetSigningCert, 'CkEmail_SetSigningCert');
  Chilkat_GetProcedureAddress(CkEmail_SetSigningCert2, 'CkEmail_SetSigningCert2');
  Chilkat_GetProcedureAddress(CkEmail_SetTextBody, 'CkEmail_SetTextBody');
  Chilkat_GetProcedureAddress(CkEmail_UidlEquals, 'CkEmail_UidlEquals');
  Chilkat_GetProcedureAddress(CkEmail_UnSpamify, 'CkEmail_UnSpamify');
  Chilkat_GetProcedureAddress(CkEmail_UnpackHtml, 'CkEmail_UnpackHtml');
  Chilkat_GetProcedureAddress(CkEmail_UnzipAttachments, 'CkEmail_UnzipAttachments');
  Chilkat_GetProcedureAddress(CkEmail_UseCertVault, 'CkEmail_UseCertVault');
  Chilkat_GetProcedureAddress(CkEmail_ZipAttachments, 'CkEmail_ZipAttachments');
  Chilkat_GetProcedureAddress(CkEmail_ComputeGlobalKey2, 'CkEmail_ComputeGlobalKey2');
  Chilkat_GetProcedureAddress(CkEmail_GetMimeSb, 'CkEmail_GetMimeSb');
  Chilkat_GetProcedureAddress(CkEmail_GetMimeBd, 'CkEmail_GetMimeBd');
  Chilkat_GetProcedureAddress(CkEmail_SetFromMimeSb, 'CkEmail_SetFromMimeSb');
  Chilkat_GetProcedureAddress(CkEmail_SetFromMimeBd, 'CkEmail_SetFromMimeBd');
  Chilkat_GetProcedureAddress(CkEmail_AddAttachmentBd, 'CkEmail_AddAttachmentBd');
  Chilkat_GetProcedureAddress(CkEmail_AddRelatedBd, 'CkEmail_AddRelatedBd');
  Chilkat_GetProcedureAddress(CkEmail_AddRelatedBd2, 'CkEmail_AddRelatedBd2');
  Chilkat_GetProcedureAddress(CkEmail_GetAttachmentBd, 'CkEmail_GetAttachmentBd');
  Chilkat_GetProcedureAddress(CkEmail_GetAlternativeBodyBd, 'CkEmail_GetAlternativeBodyBd');
  Chilkat_GetProcedureAddress(CkEmail_ApplyFixups, 'CkEmail_ApplyFixups');
  Chilkat_GetProcedureAddress(CkEmail_Clear, 'CkEmail_Clear');
  Chilkat_GetProcedureAddress(CkEmail_ConvertInlineImages, 'CkEmail_ConvertInlineImages');
  Chilkat_GetProcedureAddress(CkEmail_AttachEmail, 'CkEmail_AttachEmail');
  Chilkat_GetProcedureAddress(CkEmail_GetNthContentType, 'CkEmail_GetNthContentType');
  Chilkat_GetProcedureAddress(CkEmail_GetNthBinaryPartOfTypeBd, 'CkEmail_GetNthBinaryPartOfTypeBd');
  Chilkat_GetProcedureAddress(CkEmail_GetRelatedHeader, 'CkEmail_GetRelatedHeader');
  Chilkat_GetProcedureAddress(CkEmail_GetHtmlBodySb, 'CkEmail_GetHtmlBodySb');
  Chilkat_GetProcedureAddress(CkEmail_LastDecryptCert, 'CkEmail_LastDecryptCert');
  Chilkat_GetProcedureAddress(CkEmail_LastSignerCert, 'CkEmail_LastSignerCert');
  Chilkat_GetProcedureAddress(CkEmail_MakeCopy, 'CkEmail_MakeCopy');
  Chilkat_GetProcedureAddress(CkEmail_ToDsn, 'CkEmail_ToDsn');
  Chilkat_GetProcedureAddress(CkEmail_ToForward, 'CkEmail_ToForward');
  Chilkat_GetProcedureAddress(CkEmail_ToMdn, 'CkEmail_ToMdn');
  Chilkat_GetProcedureAddress(CkEmail_ToReply, 'CkEmail_ToReply');
  Chilkat_GetProcedureAddress(CkEmail_GetAttachedEmail, 'CkEmail_GetAttachedEmail');
  Chilkat_GetProcedureAddress(CkEmail_GetDigestEmail, 'CkEmail_GetDigestEmail');
  Chilkat_GetProcedureAddress(CkEmail_GetDsnInfo, 'CkEmail_GetDsnInfo');
  Chilkat_GetProcedureAddress(CkEmail_LinkedDomains, 'CkEmail_LinkedDomains');
  Chilkat_GetProcedureAddress(CkEmail_AddPfxSourceBd, 'CkEmail_AddPfxSourceBd');
  Chilkat_GetProcedureAddress(CkEmail_SetBodyBd, 'CkEmail_SetBodyBd');

end.
