You are here

function swiftmailer_get_headertype in Swift Mailer 7

Determines the header type based on the a header key and value.

Parameters

string $key: The header key.

string $value: The header value.

Return value

string The header type as determined based on the provided header key and value.

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

File

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

Code

function swiftmailer_get_headertype($key, $value) {
  if (swiftmailer_is_id_header($key, $value)) {
    return SWIFTMAILER_HEADER_ID;
  }
  if (swiftmailer_is_path_header($key, $value)) {
    return SWIFTMAILER_HEADER_PATH;
  }
  if (swiftmailer_is_mailbox_header($key, $value)) {
    return SWIFTMAILER_HEADER_MAILBOX;
  }
  if (swiftmailer_is_date_header($key, $value)) {
    return SWIFTMAILER_HEADER_DATE;
  }
  if (swiftmailer_is_parameterized_header($key, $value)) {
    return SWIFTMAILER_HEADER_PARAMETERIZED;
  }
  return SWIFTMAILER_HEADER_TEXT;
}