Function Notification_dispatcher->dispatch_notification_to_member
Definitions
sources/notifications.php
- Send out a notification to a member.
- Visibility: private
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: bool
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $to_member_id | MEMBER | No | No | required parameter | N/A | N/A | Member to send to |
| $setting | integer | No | No | required parameter | N/A | N/A | Listening setting |
| $notification_code | ID_TEXT | No | No | required parameter | N/A | N/A | The notification code to use |
| $code_category | ?SHORT_TEXT | No | No | required parameter | N/A | N/A | The category within the notification code (null: none) |
| $subject | SHORT_TEXT | No | No | required parameter | N/A | N/A | Message subject (in Comcode) |
| $message | LONG_TEXT | No | No | required parameter | N/A | N/A | Message body (in Comcode) |
| $from_member_id | integer | No | No | required parameter | N/A | N/A | The member ID doing the sending. Either a MEMBER or a negative number (e.g. A_FROM_SYSTEM_UNPRIVILEGED) |
| $priority | integer | No | No | required parameter | N/A | 1 5 | The message priority (1=urgent, 3=normal, 5=low) |
| &$no_cc | boolean | Yes | No | required parameter | N/A | N/A | Whether to NOT CC to the CC address (may be set to true and returned by reference once a single e-mail has been sent) |
| $attachments | array | No | No | required parameter | N/A | N/A | A list of attachments (each attachment being a map, path=>filename) |
| $use_real_from | boolean | No | No | required parameter | N/A | N/A | Whether we will make a "reply to" direct -- we only do this if we're allowed to disclose e-mail addresses for this particular notification type (i.e. if it's a direct contact) |
Returns
- Whether a notification was sent
- Type: boolean
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Send out a notification to a member.
*
* @param MEMBER $to_member_id Member to send to
* @param integer $setting Listening setting
* @param ID_TEXT $notification_code The notification code to use
* @param ?SHORT_TEXT $code_category The category within the notification code (null: none)
* @param SHORT_TEXT $subject Message subject (in Comcode)
* @param LONG_TEXT $message Message body (in Comcode)
* @param integer $from_member_id The member ID doing the sending. Either a MEMBER or a negative number (e.g. A_FROM_SYSTEM_UNPRIVILEGED)
* @param integer $priority The message priority (1=urgent, 3=normal, 5=low)
* @range 1 5
* @param boolean $no_cc Whether to NOT CC to the CC address (may be set to true and returned by reference once a single e-mail has been sent)
* @param array $attachments A list of attachments (each attachment being a map, path=>filename)
* @param boolean $use_real_from Whether we will make a "reply to" direct -- we only do this if we're allowed to disclose e-mail addresses for this particular notification type (i.e. if it's a direct contact)
* @return boolean Whether a notification was sent
*/
private function dispatch_notification_to_member(int $to_member_id, int $setting, string $notification_code, ?string $code_category, string $subject, string $message, int $from_member_id, int $priority, bool &$no_cc, array $attachments, bool $use_real_from) : bool
* Send out a notification to a member.
*
* @param MEMBER $to_member_id Member to send to
* @param integer $setting Listening setting
* @param ID_TEXT $notification_code The notification code to use
* @param ?SHORT_TEXT $code_category The category within the notification code (null: none)
* @param SHORT_TEXT $subject Message subject (in Comcode)
* @param LONG_TEXT $message Message body (in Comcode)
* @param integer $from_member_id The member ID doing the sending. Either a MEMBER or a negative number (e.g. A_FROM_SYSTEM_UNPRIVILEGED)
* @param integer $priority The message priority (1=urgent, 3=normal, 5=low)
* @range 1 5
* @param boolean $no_cc Whether to NOT CC to the CC address (may be set to true and returned by reference once a single e-mail has been sent)
* @param array $attachments A list of attachments (each attachment being a map, path=>filename)
* @param boolean $use_real_from Whether we will make a "reply to" direct -- we only do this if we're allowed to disclose e-mail addresses for this particular notification type (i.e. if it's a direct contact)
* @return boolean Whether a notification was sent
*/
private function dispatch_notification_to_member(int $to_member_id, int $setting, string $notification_code, ?string $code_category, string $subject, string $message, int $from_member_id, int $priority, bool &$no_cc, array $attachments, bool $use_real_from) : bool

