Function Mail_dispatcher_base->dispatch

Definitions

sources/mail.php

  • Send out the e-mail according to the current dispatcher configuration.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$subject_line string No No required parameter N/A N/A The subject of the mail in plain text
$message_raw LONG_TEXT No No required parameter N/A N/A The message, as Comcode
$message_web LONG_TEXT No No required parameter N/A N/A The alternate message to use in the web version, as Comcode (blank: same as $message_raw)
$to_emails ?array No No Null N/A N/A The destination (recipient) e-mail address(es) [array of strings] (null: site staff address)
$to_names ?mixed No No Null N/A N/A The recipient name(s). Array or string. (null: site name)
$from_email EMAIL No No Blank (empty string) N/A N/A The reply-to address (blank: site staff address)
$from_name string No No Blank (empty string) N/A N/A The from name (blank: site name)

Returns

  • A pair: Whether it worked, and an error message (null: skipped)
  • Type: ?array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Send out the e-mail according to the current dispatcher configuration.
 *
 * @param  string $subject_line The subject of the mail in plain text
 * @param  LONG_TEXT $message_raw The message, as Comcode
 * @param  LONG_TEXT $message_web The alternate message to use in the web version, as Comcode (blank: same as $message_raw)
 * @param  ?array $to_emails The destination (recipient) e-mail address(es) [array of strings] (null: site staff address)
 * @param  ?mixed $to_names The recipient name(s). Array or string. (null: site name)
 * @param  EMAIL $from_email The reply-to address (blank: site staff address)
 * @param  string $from_name The from name (blank: site name)
 * @return ?array A pair: Whether it worked, and an error message (null: skipped)
 */

public function dispatch(string $subject_line, string $message_raw, string $message_web, ?array $to_emails = null, $to_names = null, string $from_email = '', string $from_name = '') : ?array