public static function Conversion::swiftmailer_add_id_header in Swift Mailer 8
Same name and namespace in other branches
- 8.2 src/Utility/Conversion.php \Drupal\swiftmailer\Utility\Conversion::swiftmailer_add_id_header()
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 Conversion::swiftmailer_add_id_header()
- SwiftMailer::mail in src/
Plugin/ Mail/ SwiftMailer.php - Sends a message composed by drupal_mail().
File
- src/
Utility/ Conversion.php, line 283
Class
- Conversion
- @todo
Namespace
Drupal\swiftmailer\UtilityCode
public static function swiftmailer_add_id_header(Swift_Message $message, $key, $value) {
// Remove any already existing header identified by the provided key.
static::swiftmailer_remove_header($message, $key);
// Add the header.
$message
->getHeaders()
->addIdHeader($key, $value);
}