Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

methodTstCustomSMIMEBroker.Encode

function Encode(aActions: tContentTypeArray; aSrc, aDest: TsmEmail; aDataType: tPKCS7DataType = pData): Boolean; overload;
Applies the protections in aActions - innermost first, as for the stream broker - to aSrc's content entity and writes the wrapped message to aDest. Envelope headers (From, To, Cc, Bcc, Reply-To, Sender, Subject, Date, Message-ID) already set on aDest win; missing ones are copied from aSrc. aSrc and aDest may be the same instance. Signing resolves the signer from the From address across every supported public-key algorithm unless OnAddSigner is assigned; encryption is addressed to From, Sender, To, Cc AND Bcc (a Bcc recipient must be able to decrypt - be aware that a RecipientInfo discloses each recipient certificate to every other recipient). aDataType is accepted for signature compatibility with the stream overloads; S/MIME layers always carry id-data.