Solar_Mail_Message::addHeader()

public Solar_Mail_Message Solar_Mail_Message::addHeader ( string $label , string $value , bool $replace = true )

Adds a custom header to the message.

Parameters

  • (string) $label: The header label.

  • (string) $value: The header value.

  • (bool) $replace: If true, resets all headers of the same label so that this is the only value for that header.

Returns

  • (Solar_Mail_Message) This object.

Description

Adds a custom header to the message.

Canonicalizes the label, and strips CR/LF from the value, to help prevent header injections.

If you need to wrap lines in the header value, don't worry; the header encoding routine will wrap them for you.



Local