You are here

function swiftmailer_is_path_header in Swift Mailer 7

Checks whether a header is a path header.

It is difficult to distinguish id, mailbox and path headers from each other as they all may very well contain the exact same value. This function simply checks whether the header key equals to 'Message-ID' to determine if the header is a path header.

Parameters

string $key: The header key.

string $value: The header value.

Return value

boolean TRUE if the provided header is a path header, and otherwise FALSE.

See also

http://swift_mailer.org/docs/header-path

1 call to swiftmailer_is_path_header()
swiftmailer_get_headertype in includes/helpers/conversion.inc
Determines the header type based on the a header key and value.

File

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

Code

function swiftmailer_is_path_header($key, $value) {
  if (valid_email_address($value) && $key == 'Return-Path') {
    return TRUE;
  }
  else {
    return FALSE;
  }
}