You are here

function swiftmailer_add_id_header in Swift Mailer 7

Adds an id header to a message.

Parameters

Swift_Message $message: The message which the id header is to be added to.

string $key: The header key.

string $value: The header value.

1 call to swiftmailer_add_id_header()
SWIFTMailSystem::mail in includes/classes/SWIFTMailSystem.inc
Sends a message composed by drupal_mail().

File

includes/helpers/conversion.inc, line 274
This file contains conversion functions.

Code

function swiftmailer_add_id_header(Swift_Message $message, $key, $value) {

  // Remove any already existing header identified by the provided key.
  swiftmailer_remove_header($message, $key);

  // Add the header.
  $message
    ->getHeaders()
    ->addIdHeader($key, $value);
}