Skip to main content

ContentTransfer

property ContentTransfer: string read write;

Example

procedure RequestBase64(const Part: TIdMessagePart);
begin
Part.ContentTransfer := 'base64';
end;

Usage

ContentTransfer reads or replaces the first Content-Transfer-Encoding header token without transforming or checking the part body.

Additional Technical Info

ContentTransfer maps to the first Content-Transfer-Encoding header value. Nonempty assignment stores the raw String; empty removes the first occurrence. Duplicates may remain.

Assignment does not encode/decode the body and does not validate 7bit, 8bit, binary, quoted-printable, base64 or extension tokens. A metadata/body mismatch can produce invalid or corrupted mail when another component assumes the declaration is accurate.

For text, TIdText.IsBodyEncodingRequired only detects characters above ASCII and does not choose/set this property. Apply the mail encoder's complete policy rather than blindly assigning from that Boolean.

The property is independent of IsEncoded, which remains false in current part source. Header mutation is synchronous and not thread-safe.

The source-reviewed example sets metadata only; it did not encode or send content.

External references

Created 2026-07-15