Function __global->can_email_member
Definitions
sources/mail2.php
- Find if a member can be e-mailed.This is a wrapper for can_email_address.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: bool
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $member_id | MEMBER | No | No | required parameter | N/A | N/A | The member ID |
| $host | ?string | No | No | Null | N/A | N/A | The server hostname (null: use configured) |
| $port | ?integer | No | No | Null | N/A | N/A | The port (null: use configured) |
| $type | ?string | No | No | Null | imap imaps imaps_nocert pop3 pop3s pop3s_nocert | N/A | The protocol (null: use configured / autodetect) |
| $folder | ?string | No | No | Null | N/A | N/A | The inbox identifier (null: use configured) |
| $username | ?string | No | No | Null | N/A | N/A | The username (null: use configured) |
| $password | ?string | No | No | Null | N/A | N/A | The password (null: use configured) |
Returns
- Whether the member can be e-mailed
- Type: boolean
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Find if a member can be e-mailed.This is a wrapper for can_email_address.
*
* @param MEMBER $member_id The member ID
* @param ?string $host The server hostname (null: use configured)
* @param ?integer $port The port (null: use configured)
* @param ?string $type The protocol (null: use configured / autodetect)
* @set imap imaps imaps_nocert pop3 pop3s pop3s_nocert
* @param ?string $folder The inbox identifier (null: use configured)
* @param ?string $username The username (null: use configured)
* @param ?string $password The password (null: use configured)
* @return boolean Whether the member can be e-mailed
*/
function can_email_member(int $member_id, ?string $host = null, ?int $port = null, ?string $type = null, ?string $folder = null, ?string $username = null, ?string $password = null) : bool
* Find if a member can be e-mailed.This is a wrapper for can_email_address.
*
* @param MEMBER $member_id The member ID
* @param ?string $host The server hostname (null: use configured)
* @param ?integer $port The port (null: use configured)
* @param ?string $type The protocol (null: use configured / autodetect)
* @set imap imaps imaps_nocert pop3 pop3s pop3s_nocert
* @param ?string $folder The inbox identifier (null: use configured)
* @param ?string $username The username (null: use configured)
* @param ?string $password The password (null: use configured)
* @return boolean Whether the member can be e-mailed
*/
function can_email_member(int $member_id, ?string $host = null, ?int $port = null, ?string $type = null, ?string $folder = null, ?string $username = null, ?string $password = null) : bool

