Function EmailIntegration->get_email_address_from_header

Definitions

sources/mail_integration.php

  • Try and get an e-mail address from an embedded part of an e-mail header.
  • Visibility: protected
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$header string No No required parameter N/A N/A E-mail header

Returns

  • A pair: E-mail address (hopefully), From name (null: failed to parse)
  • Type: ?array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Try and get an e-mail address from an embedded part of an e-mail header.
 *
 * @param  string $header E-mail header
 * @return ?array A pair: E-mail address (hopefully), From name (null: failed to parse)
 */

protected function get_email_address_from_header(string $header) : ?array