Function Mail_dispatcher_base->log_message
Definitions
sources/mail.php
- Log a message into the database.
- Visibility: protected
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: int
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $queued | boolean | No | No | required parameter | N/A | N/A | Whether the message is to be queued rather than just logged |
| $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_extended | LONG_TEXT | No | No | required parameter | N/A | N/A | The alternate Comcode to display in the web version of the message (blank: should be identical to $message_raw) |
| $to_emails | array | No | No | required parameter | N/A | N/A | The destination (recipient) e-mail addresses [array of strings] |
| $to_names | array | No | No | required parameter | N/A | N/A | The recipient names [array of strings] |
| $from_email | No | No | required parameter | N/A | N/A | The reply-to address (blank: site staff address) | |
| $from_name | string | No | No | required parameter | N/A | N/A | The from name (blank: site name) |
| &$resource_guid | string | Yes | No | required parameter | N/A | N/A | The GUID for this message, passed by reference (blank: none generated) |
Returns
- The queue ID (null: could not log)
- Type: ?AUTO_LINK
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Log a message into the database.
*
* @param boolean $queued Whether the message is to be queued rather than just logged
* @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_extended The alternate Comcode to display in the web version of the message (blank: should be identical to $message_raw)
* @param array $to_emails The destination (recipient) e-mail addresses [array of strings]
* @param array $to_names The recipient names [array of strings]
* @param EMAIL $from_email The reply-to address (blank: site staff address)
* @param string $from_name The from name (blank: site name)
* @param string $resource_guid The GUID for this message, passed by reference (blank: none generated)
* @return ?AUTO_LINK The queue ID (null: could not log)
*/
protected function log_message(bool $queued, string $subject_line, string $message_raw, string $message_extended, array $to_emails, array $to_names, string $from_email, string $from_name, string &$resource_guid) : ?int
* Log a message into the database.
*
* @param boolean $queued Whether the message is to be queued rather than just logged
* @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_extended The alternate Comcode to display in the web version of the message (blank: should be identical to $message_raw)
* @param array $to_emails The destination (recipient) e-mail addresses [array of strings]
* @param array $to_names The recipient names [array of strings]
* @param EMAIL $from_email The reply-to address (blank: site staff address)
* @param string $from_name The from name (blank: site name)
* @param string $resource_guid The GUID for this message, passed by reference (blank: none generated)
* @return ?AUTO_LINK The queue ID (null: could not log)
*/
protected function log_message(bool $queued, string $subject_line, string $message_raw, string $message_extended, array $to_emails, array $to_names, string $from_email, string $from_name, string &$resource_guid) : ?int

