I can't seem to get mine to work. Perhaps it is because the code in my file is different than the two possibilities you provided. Mine is:
PHP Code:
if ($vboptions['newuseremail'] != '')
{
if ($havefields)
{
$DB_site->data_seek(0, $profilefields);
while ($profilefield = $DB_site->fetch_array($profilefields))
{
$cfield = '';
$varname = "field$profilefield[profilefieldid]";
if ($profilefield['type'] == 'checkbox' OR $profilefield['type'] == 'select_multiple')
{
$data = unserialize($profilefield['data']);
foreach ($data AS $key => $value)
{
$pow = pow(2, $key);
if (pow(2, $key) & $$varname)
{
$cfield .= (!empty($cfield) ? ', ' : '') . $data["$key"];
}
}
}
else
{
$cfield = $$varname;
}
$customfields .= "$profilefield[title] : $cfield\n";
}
}
$username = $_POST['username'];
$email = $_POST['email'];
eval(fetch_email_phrases('newuser', 0));
$newemails = explode(' ', $vboptions['newuseremail']);
foreach ($newemails AS $toemail)
{
if (trim($toemail))
{
vbmail($toemail, $subject, $message);
}
}
}
I added your code after this, but it doesn't work!