The current compose code is making huge stress to the database if for example there are 100k registered users.
The TO: row must be removed or reworked as an input field, rather than select which gets all users from the database.
The TO: row must be removed or reworked as an input field, rather than select which gets all users from the database.
# Don't display yourself, Privacy is determined on acceptpms - (From All or Staff Only).
$res = SQL_Query_exec("SELECT id, username FROM users WHERE id != $CURUSER[id] AND enabled = 'yes' AND status = 'confirmed' $where ORDER BY username");
if (mysqli_num_rows($res))
{
$to = "<select name=\"userid\">\n";
while ($arr = mysqli_fetch_assoc($res)) $to .= "<option value=\"$arr[id]\">$arr[username]</option>\n";
$to .= "</select>\n";
}

